Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Goober
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
36
Issues
36
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Morgan McMillian
Goober
Commits
83d1ff25
Commit
83d1ff25
authored
Aug 05, 2017
by
Morgan McMillian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wire up cc on reply setting and refresh timeline on back event
parent
3f57ebe1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
src/pages/settings/settings.ts
src/pages/settings/settings.ts
+7
-1
src/pages/stream/stream.ts
src/pages/stream/stream.ts
+10
-2
No files found.
src/pages/settings/settings.ts
View file @
83d1ff25
import
{
Component
}
from
'
@angular/core
'
;
import
{
NavController
,
NavParams
}
from
'
ionic-angular
'
;
import
{
Storage
}
from
'
@ionic/storage
'
;
import
{
Events
}
from
'
ionic-angular
'
;
/**
* Generated class for the SettingsPage page.
...
...
@@ -17,7 +18,8 @@ export class SettingsPage {
private
set_unified
:
boolean
;
private
set_cc
:
boolean
;
constructor
(
public
navCtrl
:
NavController
,
private
storage
:
Storage
,
public
navParams
:
NavParams
)
{
constructor
(
public
navCtrl
:
NavController
,
private
storage
:
Storage
,
public
navParams
:
NavParams
,
public
events
:
Events
)
{
}
ngAfterViewInit
()
{
...
...
@@ -34,6 +36,10 @@ export class SettingsPage {
});
}
ionViewDidLeave
()
{
this
.
events
.
publish
(
'
stream:reload
'
,
{});
}
updateUnified
()
{
this
.
storage
.
set
(
'
unified
'
,
this
.
set_unified
);
}
...
...
src/pages/stream/stream.ts
View file @
83d1ff25
...
...
@@ -29,12 +29,17 @@ export class StreamPage {
myUsername
:
string
;
showScrollBtn
:
boolean
=
false
;
showUnified
:
boolean
;
ccOnReply
:
boolean
=
false
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
public
modalCtrl
:
ModalController
,
private
changeDetectorRef
:
ChangeDetectorRef
,
public
toastCtrl
:
ToastController
,
private
storage
:
Storage
,
public
popoverCtrl
:
PopoverController
,
public
events
:
Events
)
{
// console.log(JSON.stringify(navParams));
this
.
storage
.
get
(
'
cc
'
).
then
((
val
)
=>
{
this
.
ccOnReply
=
val
;
});
this
.
storage
.
get
(
'
unified
'
).
then
((
val
)
=>
{
this
.
showUnified
=
val
;
...
...
@@ -274,13 +279,13 @@ export class StreamPage {
}
showReplyPost
(
postData
)
{
let
newPostModal
=
this
.
modalCtrl
.
create
(
NewPostModal
,
{
type
:
'
reply
'
,
post
:
postData
,
me
:
this
.
myUsername
});
let
newPostModal
=
this
.
modalCtrl
.
create
(
NewPostModal
,
{
type
:
'
reply
'
,
post
:
postData
,
me
:
this
.
myUsername
,
cc
:
this
.
ccOnReply
});
newPostModal
.
present
();
}
showQuotedPost
(
postData
)
{
console
.
log
(
postData
);
let
newPostModal
=
this
.
modalCtrl
.
create
(
NewPostModal
,
{
type
:
'
quote
'
,
post
:
postData
,
me
:
this
.
myUsername
});
let
newPostModal
=
this
.
modalCtrl
.
create
(
NewPostModal
,
{
type
:
'
quote
'
,
post
:
postData
,
me
:
this
.
myUsername
,
cc
:
this
.
ccOnReply
});
newPostModal
.
present
();
}
...
...
@@ -401,6 +406,9 @@ export class NewPostModal {
parseMentions
(
mentions
)
{
let
mtext
=
""
if
(
this
.
navParams
.
data
.
cc
)
{
mtext
+=
"
\n
/
"
;
}
for
(
var
i
=
0
;
i
<
mentions
.
length
;
i
++
)
{
let
mu
=
mentions
[
i
].
text
;
if
(
mu
!==
this
.
myUsername
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment