File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 198
198
data () {
199
199
return {
200
200
cardHovered: false ,
201
+ isInstalled: false ,
202
+ isFetchingInstalled: false ,
203
+ isPresenceInstalledInterval: null ,
201
204
presenceLinkName: this .$props .presence .service
202
205
};
203
206
},
210
213
this .isPresenceInstalled (this .presence .service ).then (response => {
211
214
if (response) this .isInstalled = true ;
212
215
});
216
+
217
+ this .isPresenceInstalledInterval = setInterval (() => {
218
+ if (this .isFetchingInstalled ) return ;
219
+ this .isFetchingInstalled = true ;
220
+ this .isPresenceInstalled (this .presence .service ).then (response => {
221
+ if (response) this .isInstalled = true ;
222
+ else this .isInstalled = false ;
223
+ this .isFetchingInstalled = false ;
224
+ });
225
+ }, 1000 );
226
+ },
227
+ beforeDestroy () {
228
+ clearInterval (this .isPresenceInstalledInterval );
213
229
},
214
230
methods: {
215
231
like () {
You can’t perform that action at this time.
0 commit comments