rewrite onRefresh to use callbacks
This commit is contained in:
parent
4581ec76f3
commit
0ba207623d
1 changed files with 8 additions and 8 deletions
|
@ -27,14 +27,14 @@ export default class EntryManager {
|
||||||
Window.addActionListener(`onFocusChanged`, (data) => {this.onRefresh()});
|
Window.addActionListener(`onFocusChanged`, (data) => {this.onRefresh()});
|
||||||
}
|
}
|
||||||
|
|
||||||
async onRefresh() {
|
onRefresh() {
|
||||||
const DATA = await Tabs.query(null, 0)
|
(Tabs.query(null, 0)).then((DATA) => {
|
||||||
|
if (DATA ? (DATA.url) : false) {
|
||||||
if (DATA.url) {
|
(check.platform(DATA.url)).then((result) => {
|
||||||
(!!await check.platform(DATA.url))
|
(result) ? (this.enable()) : (this.disable())
|
||||||
? (this.enable())
|
});
|
||||||
: (this.disable())
|
|
||||||
};
|
};
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue