mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-23 02:00:20 +07:00
feat: add async post in gateway controller (#1963)
This commit is contained in:
@@ -14,6 +14,19 @@ import "../Config"
|
||||
PageType {
|
||||
id: root
|
||||
|
||||
Connections {
|
||||
target: ApiNewsController
|
||||
function onFetchNewsFinished() {
|
||||
PageController.showBusyIndicator(false)
|
||||
}
|
||||
|
||||
function onErrorOccurred(errorCode) {
|
||||
PageController.showErrorMessage(errorCode)
|
||||
PageController.closePage()
|
||||
PageController.showBusyIndicator(false)
|
||||
}
|
||||
}
|
||||
|
||||
ListViewType {
|
||||
id: listView
|
||||
|
||||
@@ -140,9 +153,8 @@ PageType {
|
||||
return;
|
||||
}
|
||||
PageController.showBusyIndicator(true)
|
||||
ApiNewsController.fetchNews();
|
||||
ApiNewsController.fetchNews()
|
||||
PageController.goToPage(PageEnum.PageSettingsNewsNotifications)
|
||||
PageController.showBusyIndicator(false)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user