Fix crash with no groups in common

This commit is contained in:
John Gibbon 2020-10-19 21:06:28 +02:00
parent 98e2bea69f
commit 214a6c780c
11 changed files with 80 additions and 8 deletions

View file

@ -38,7 +38,7 @@ ChatInformationTabItemBase {
SilicaListView {
id: membersView
model: isPrivateChat ? delegateModel : chatInformationPage.membersList
model: isPrivateChat ? (chatPartnerCommonGroupsIds.length > 0 ? delegateModel : null) : chatInformationPage.membersList
clip: true
height: tabBase.height
width: tabBase.width
@ -68,7 +68,10 @@ ChatInformationTabItemBase {
onQuickScrollAnimatingChanged: {
handleScrollIntoView(true)
}
ViewPlaceholder {
enabled: membersView.count === 0
text: chatInformationPage.isPrivateChat ? qsTr("You don't have any groups in common with this user.") : qsTr("This group is empty.")
}
delegate: PhotoTextsListItem {
pictureThumbnail {
photoData: (typeof user.profile_photo !== "undefined") ? user.profile_photo.small : ""

View file

@ -34,17 +34,14 @@ Item {
Item {
id: tabViewHeader
/*
* Tab view is prepared, but "disabled" for now
* to view shared media/links/,
* Tab view was prepared for
* shared media/links/, but for this
* we need message search with filters
*/
// START: change this to enable
height: visible ? headerGrid.height : 0
// height: 0
clip: true
visible: tabView.count > 1
// END: change this to enable
anchors {
left: parent.left
@ -80,7 +77,7 @@ Item {
}
}
Label {
text: headerItem.tabItem.title// + headerItem.itemIsActive
text: headerItem.tabItem.title
width: parent.width
horizontalAlignment: Text.AlignHCenter
anchors.top: headerIcon.bottom

View file

@ -183,6 +183,14 @@
<source>Loading group members</source>
<translation>Lade Gruppenmitglieder</translation>
</message>
<message>
<source>You don&apos;t have any groups in common with this user.</source>
<translation>Sie haben mit diesem Benutzer keine gemeinsamen Gruppen.</translation>
</message>
<message>
<source>This group is empty.</source>
<translation>Diese Gruppe ist leer.</translation>
</message>
</context>
<context>
<name>ChatInformationTabItemSettings</name>

View file

@ -183,6 +183,14 @@
<source>You</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You don&apos;t have any groups in common with this user.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This group is empty.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatInformationTabItemSettings</name>

View file

@ -183,6 +183,14 @@
<source>You</source>
<translation type="unfinished">Sinä</translation>
</message>
<message>
<source>You don&apos;t have any groups in common with this user.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This group is empty.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatInformationTabItemSettings</name>

View file

@ -183,6 +183,14 @@
<source>You</source>
<translation type="unfinished">Te</translation>
</message>
<message>
<source>You don&apos;t have any groups in common with this user.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This group is empty.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatInformationTabItemSettings</name>

View file

@ -183,6 +183,14 @@
<source>Unknown</source>
<translation type="unfinished">Sconosciuto</translation>
</message>
<message>
<source>You don&apos;t have any groups in common with this user.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This group is empty.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatInformationTabItemSettings</name>

View file

@ -183,6 +183,14 @@
<source>You</source>
<translation type="unfinished">Ty</translation>
</message>
<message>
<source>You don&apos;t have any groups in common with this user.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This group is empty.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatInformationTabItemSettings</name>

View file

@ -183,6 +183,14 @@
<source>You</source>
<translation type="unfinished">Вы</translation>
</message>
<message>
<source>You don&apos;t have any groups in common with this user.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This group is empty.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatInformationTabItemSettings</name>

View file

@ -183,6 +183,14 @@
<source>You</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You don&apos;t have any groups in common with this user.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This group is empty.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatInformationTabItemSettings</name>

View file

@ -183,6 +183,14 @@
<source>You</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You don&apos;t have any groups in common with this user.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This group is empty.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatInformationTabItemSettings</name>