From db1711bc5874bd686228b3a0623e9bcd0451ee32 Mon Sep 17 00:00:00 2001 From: Damien Caliste Date: Tue, 20 Aug 2024 15:40:57 +0200 Subject: [PATCH 26/33] Use new SyncManager from Buteo.Profiles. Replace the QML objects declared from qml-module-buteo-syncfw by the new upstream SyncManager from qml-module-buteo-profiles. Signed-off-by: Mike Gabriel --- .../Lomiri/Contacts/ContactListView.qml | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/imports/Lomiri/Contacts/ContactListView.qml b/src/imports/Lomiri/Contacts/ContactListView.qml index 8e0f90f9..6cefc2c7 100644 --- a/src/imports/Lomiri/Contacts/ContactListView.qml +++ b/src/imports/Lomiri/Contacts/ContactListView.qml @@ -22,7 +22,7 @@ import Lomiri.Components 1.3 import Lomiri.Components.ListItems 1.3 as ListItem import Lomiri.Components.Popups 1.3 import Lomiri.Contacts 0.1 as Contacts -import Buteo 0.1 +import Buteo.Profiles 0.1 /*! \qmltype ContactListView @@ -209,7 +209,7 @@ FocusScope { This property holds if the import from account option should be visible on the list */ - property bool showImportFromAccountOption: buteoSync.serviceAvailable + property bool showImportFromAccountOption: syncManager.serviceAvailable property bool runningOnTestMode: false @@ -230,18 +230,13 @@ FocusScope { This property holds if the list is running a sync with online accounts or not */ - readonly property bool syncing: buteoSync.syncing + readonly property bool syncing: syncManager.synchronizing /*! \qmlproperty bool syncEnabled This property holds if there is online account to sync or not */ - // we are using 'buteoSync.visibleSyncProfiles because' it is a property - // and will re-check if the property changes. - // Using only '(buteoSync.syncProfilesByCategory("contacts").length > 0)' - // the value will be checked only on app startup - readonly property bool syncEnabled: (buteoSync.profilesCount > 0) && - (buteoSync.syncProfilesByCategory("contacts").length > 0) + readonly property bool syncEnabled: syncManager.profiles.length > 0 property alias headerItem: view.headerItem /*! @@ -401,7 +396,7 @@ FocusScope { */ function sync() { - buteoSync.startSyncByCategory("contacts") + syncManager.synchronize() } /*! @@ -656,8 +651,11 @@ FocusScope { } } - ButeoSync { - id: buteoSync + SyncManager { + id: syncManager + filterHidden: true + filterBy.key: "category" + filterBy.value: "contacts" } SIMList { -- 2.39.5