File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -301,6 +301,12 @@ export class AppComponent implements OnInit {
301
301
document . execCommand ( 'Copy' ) ;
302
302
this . _shared . triggerNotify ( 'Copied' ) ;
303
303
this . updateNotify ( ) ;
304
+ } else {
305
+ setTimeout ( ( ) => {
306
+ document . execCommand ( 'Copy' ) ;
307
+ this . _shared . triggerNotify ( 'Copied' ) ;
308
+ this . updateNotify ( ) ;
309
+ } , 1000 ) ;
304
310
}
305
311
}
306
312
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import { Http } from '@angular/http';
14
14
export class SettingsComponent implements OnInit {
15
15
16
16
private finished = false ;
17
+ notify : any ;
17
18
18
19
_shared : any ;
19
20
_fb : any ;
@@ -41,6 +42,7 @@ export class SettingsComponent implements OnInit {
41
42
this . _fb = fb ;
42
43
this . _app = app ;
43
44
this . _search = search ;
45
+ this . notify = this . _shared . notify ;
44
46
}
45
47
46
48
ngOnInit ( ) {
@@ -66,6 +68,7 @@ export class SettingsComponent implements OnInit {
66
68
} ) ;
67
69
this . _app . setSettings ( this . settings , 0 ) ;
68
70
this . _search . setSettings ( this . settings , 1 ) ;
71
+ this . notifySettings ( ) ;
69
72
} ) ;
70
73
}
71
74
@@ -95,6 +98,24 @@ export class SettingsComponent implements OnInit {
95
98
this . _shared . feedVideos = null ;
96
99
this . _app . getSettings ( ) ;
97
100
this . _app . getFeedVideos ( ) ;
101
+ this . notifySettings ( ) ;
98
102
setTimeout ( ( ) => this . loadingRegion = false , 100 ) ;
99
103
}
104
+
105
+ notifySettings ( ) {
106
+ if ( ! this . notify . enabled ) {
107
+ this . _shared . triggerNotify ( 'Changed' ) ;
108
+ this . updateNotify ( ) ;
109
+ } else {
110
+ setTimeout ( ( ) => {
111
+ this . _shared . triggerNotify ( 'Changed' ) ;
112
+ this . updateNotify ( ) ;
113
+ } , 1000 ) ;
114
+ }
115
+ }
116
+
117
+ updateNotify ( ) {
118
+ this . notify = this . _shared . notify ;
119
+ setTimeout ( ( ) => this . notify = this . _shared . notify , 1000 ) ;
120
+ }
100
121
}
You can’t perform that action at this time.
0 commit comments