Changeset 7b7294d in subsurface


Ignore:
Timestamp:
Jun 21, 2017, 5:20:07 PM (5 months ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
a7fca80
Parents:
e0f46b03
git-author:
Dirk Hohndel <dirk@…> (06/21/17 15:54:34)
git-committer:
Dirk Hohndel <dirk@…> (06/21/17 17:20:07)
Message:

QML UI: DiveList?: implement pull down to refresh

Signed-off-by: Dirk Hohndel <dirk@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mobile-widgets/qml/DiveList.qml

    re0f46b03 r7b7294d  
    2020        property color textColor: subsurfaceTheme.diveListTextColor
    2121        property int horizontalPadding: Kirigami.Units.gridUnit / 2 - Kirigami.Units.smallSpacing  + 1
     22
     23        supportsRefreshing: true
     24        onRefreshingChanged: {
     25                if (refreshing) {
     26                        if (manager.credentialStatus === QMLManager.VALID || manager.credentialStatus === QMLManager.VALID_EMAIL) {
     27                                console.log("User pulled down dive list - syncing with cloud storage")
     28                                detailsWindow.endEditMode()
     29                                manager.saveChangesCloud(true)
     30                                console.log("done syncing, turn off spinner")
     31                                refreshing = false
     32                        } else {
     33                                console.log("sync with cloud storage requested, but credentialStatus is " + manager.credentialStatus)
     34                        }
     35                }
     36        }
    2237
    2338        Component {
Note: See TracChangeset for help on using the changeset viewer.