@@ -28,6 +28,12 @@ class TwitterHook {
2828 this . mountSyncToggleApp ( el ) ;
2929 } ,
3030 } ,
31+ {
32+ selector : '[data-testid="tweet"]' ,
33+ callback : async ( el ) => {
34+ this . mountSyncOldTweets ( ) ;
35+ } ,
36+ } ,
3137 ] ;
3238
3339 let startPromise : Promise < NoteInput > | undefined ;
@@ -93,15 +99,15 @@ class TwitterHook {
9399 this . main . xlog ( 'error' , 'Failed to add account change event listener.' , e ) ;
94100 }
95101
96- // Listen on route change Event
97- try {
98- this . main . xlog ( 'info' , 'Adding route change event listener.' ) ;
99- window . removeEventListener ( 'locationchange' , ( ) => this . mountSyncOldTweets ( ) ) ; // Remove old (if any)
100- window . addEventListener ( 'locationchange' , ( ) => this . mountSyncOldTweets ( ) ) ; // Add new
101- } catch ( e ) {
102- this . main . xlog ( 'error' , 'Failed to add route change event listener.' , e ) ;
103- }
104- this . mountSyncOldTweets ( ) ; // Init Run
102+ // // Listen on route change Event
103+ // try {
104+ // this.main.xlog('info', 'Adding route change event listener.');
105+ // window.removeEventListener('locationchange', () => this.mountSyncOldTweets()); // Remove old (if any)
106+ // window.addEventListener('locationchange', () => this.mountSyncOldTweets()); // Add new
107+ // } catch (e) {
108+ // this.main.xlog('error', 'Failed to add route change event listener.', e);
109+ // }
110+ // this.mountSyncOldTweets(); // Init Run
105111 }
106112
107113 private async sync ( note : NoteInput , attachmentUrls ?: string [ ] ) {
0 commit comments