Chat Information Page: Improvements for channels

This commit is contained in:
Sebastian Wolf 2020-11-02 22:51:12 +01:00
parent f7738e5178
commit 5ee71dda29
13 changed files with 47 additions and 6 deletions

View file

@ -30,12 +30,11 @@ ChatInformationTabItemBase {
title: chatInformationPage.isPrivateChat ? qsTr("Groups", "Button: groups in common (short)") : qsTr("Members", "Button: Group Members")
image: "image://theme/icon-m-people"
loadingText: isPrivateChat ? qsTr("Loading common chats…", "chats you have in common with a user") : qsTr("Loading group members…")
loading: chatInformationPage.isSuperGroup || chatInformationPage.isPrivateChat
loading: ( chatInformationPage.isSuperGroup || chatInformationPage.isPrivateChat) && !chatInformationPage.isChannel
loadingVisible: loading && membersView.count === 0
property variant chatPartnerCommonGroupsIds: ([]);
SilicaListView {
id: membersView
model: isPrivateChat ? (chatPartnerCommonGroupsIds.length > 0 ? delegateModel : null) : chatInformationPage.membersList
@ -69,8 +68,9 @@ ChatInformationTabItemBase {
handleScrollIntoView(true)
}
ViewPlaceholder {
y: Theme.paddingLarge
enabled: membersView.count === 0
text: chatInformationPage.isPrivateChat ? qsTr("You don't have any groups in common with this user.") : qsTr("This group is empty.")
text: chatInformationPage.isPrivateChat ? qsTr("You don't have any groups in common with this user.") : ( chatInformationPage.isChannel ? qsTr("Channel members are anonymous.") : qsTr("This group is empty.") )
}
delegate: PhotoTextsListItem {
pictureThumbnail {
@ -108,7 +108,7 @@ ChatInformationTabItemBase {
id: loadMoreIndicator
anchors.centerIn: parent
size: BusyIndicatorSize.Small
running: parent.active
running: tabBase.loading
}
}
}
@ -174,7 +174,7 @@ ChatInformationTabItemBase {
interval: 600
property int fetchLimit: 50
onTriggered: {
if(isSuperGroup) {
if(isSuperGroup && !isChannel) {
tabBase.loading = true
tdLibWrapper.getSupergroupMembers(chatInformationPage.chatPartnerGroupId, fetchLimit, membersList.count);
fetchLimit = 200

View file

@ -41,7 +41,7 @@ Item {
height: visible ? headerGrid.height : 0
clip: true
visible: tabView.count > 1
visible: tabView.count > 0
anchors {
left: parent.left

View file

@ -48,5 +48,6 @@ Column {
x: Theme.horizontalPageMargin
font.pixelSize: Theme.fontSizeSmall
color: Theme.secondaryHighlightColor
wrapMode: Text.Wrap
}
}

View file

@ -191,6 +191,10 @@
<source>This group is empty.</source>
<translation>Diese Gruppe ist leer.</translation>
</message>
<message>
<source>Channel members are anonymous.</source>
<translation>Mitglieder von Kanälen sind anonym.</translation>
</message>
</context>
<context>
<name>ChatInformationTabItemSettings</name>

View file

@ -191,6 +191,10 @@
<source>This group is empty.</source>
<translation>Este grupo está vacío.</translation>
</message>
<message>
<source>Channel members are anonymous.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatInformationTabItemSettings</name>

View file

@ -191,6 +191,10 @@
<source>This group is empty.</source>
<translation>Tämä ryhmä on tyhjä.</translation>
</message>
<message>
<source>Channel members are anonymous.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatInformationTabItemSettings</name>

View file

@ -191,6 +191,10 @@
<source>This group is empty.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Channel members are anonymous.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatInformationTabItemSettings</name>

View file

@ -191,6 +191,10 @@
<source>Loading group members</source>
<translation>Carica membri del gruppo</translation>
</message>
<message>
<source>Channel members are anonymous.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatInformationTabItemSettings</name>

View file

@ -191,6 +191,10 @@
<source>This group is empty.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Channel members are anonymous.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatInformationTabItemSettings</name>

View file

@ -191,6 +191,10 @@
<source>This group is empty.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Channel members are anonymous.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatInformationTabItemSettings</name>

View file

@ -191,6 +191,10 @@
<source>This group is empty.</source>
<translation>Denna grupp är tom.</translation>
</message>
<message>
<source>Channel members are anonymous.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatInformationTabItemSettings</name>

View file

@ -191,6 +191,10 @@
<source>This group is empty.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Channel members are anonymous.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatInformationTabItemSettings</name>

View file

@ -191,6 +191,10 @@
<source>This group is empty.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Channel members are anonymous.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatInformationTabItemSettings</name>