Busy indicator for chat list
This commit is contained in:
parent
a6768bc9dd
commit
d4954e0d7e
3 changed files with 186 additions and 158 deletions
|
@ -54,11 +54,6 @@ Page {
|
|||
}
|
||||
}
|
||||
|
||||
BusyLabel {
|
||||
text: qsTr("Loading...")
|
||||
running: overviewPage.loading
|
||||
}
|
||||
|
||||
function setPageStatus() {
|
||||
switch (overviewPage.connectionState) {
|
||||
case TelegramAPI.WaitingForNetwork:
|
||||
|
@ -187,15 +182,21 @@ Page {
|
|||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
id: chatListItem
|
||||
width: parent.width
|
||||
height: parent.height - Theme.paddingMedium - headerRow.height
|
||||
|
||||
SilicaListView {
|
||||
|
||||
id: chatListView
|
||||
|
||||
width: parent.width
|
||||
height: parent.height - Theme.paddingMedium - headerRow.height
|
||||
anchors.fill: parent
|
||||
|
||||
clip: true
|
||||
visible: count > 0
|
||||
opacity: overviewPage.chatListCreated ? 1 : 0
|
||||
Behavior on opacity { NumberAnimation {} }
|
||||
|
||||
model: chatListModel
|
||||
delegate: ListItem {
|
||||
|
@ -381,6 +382,33 @@ Page {
|
|||
VerticalScrollDecorator {}
|
||||
}
|
||||
|
||||
Column {
|
||||
width: parent.width
|
||||
height: loadingLabel.height + loadingBusyIndicator.height + Theme.paddingMedium
|
||||
spacing: Theme.paddingMedium
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
opacity: overviewPage.chatListCreated ? 0 : 1
|
||||
Behavior on opacity { NumberAnimation {} }
|
||||
visible: !overviewPage.chatListCreated
|
||||
|
||||
InfoLabel {
|
||||
id: loadingLabel
|
||||
text: qsTr("Loading chat list...")
|
||||
}
|
||||
|
||||
BusyIndicator {
|
||||
id: loadingBusyIndicator
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
running: !overviewPage.chatListCreated
|
||||
size: BusyIndicatorSize.Large
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -151,7 +151,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<source>Loading messages...</source>
|
||||
<translation>Nachrichten laden...</translation>
|
||||
<translation>Lade Nachrichten...</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
@ -275,10 +275,6 @@
|
|||
<source>About Fernschreiber</source>
|
||||
<translation>Über Fernschreiber</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Loading...</source>
|
||||
<translation>Laden...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Fernschreiber</source>
|
||||
<translation>Fernschreiber</translation>
|
||||
|
@ -307,6 +303,10 @@
|
|||
<source>You</source>
|
||||
<translation>Sie</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Loading chat list...</source>
|
||||
<translation>Lade Chatliste...</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>VideoPage</name>
|
||||
|
|
|
@ -275,10 +275,6 @@
|
|||
<source>About Fernschreiber</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Loading...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Fernschreiber</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -307,6 +303,10 @@
|
|||
<source>You</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Loading chat list...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>VideoPage</name>
|
||||
|
|
Loading…
Reference in a new issue