permissions: replace leftover debug changes; fix another copy/paste
This commit is contained in:
parent
c4947260f7
commit
c76d079e03
2 changed files with 6 additions and 4 deletions
|
@ -1208,7 +1208,7 @@ Page {
|
|||
leftMargin: visible ? Theme.paddingSmall : 0
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
visible: chatPage.chatInformation.can_be_forwarded && selectedMessages.every(function(message){
|
||||
visible: selectedMessages.every(function(message){
|
||||
return message.can_be_forwarded
|
||||
})
|
||||
width: visible ? Theme.itemSizeMedium : 0
|
||||
|
@ -1218,6 +1218,7 @@ Page {
|
|||
var neededPermissions = Functions.getMessagesNeededForwardPermissions(chatPage.selectedMessages);
|
||||
var chatId = chatInformation.id;
|
||||
pageStack.push(Qt.resolvedUrl("../pages/ChatSelectionPage.qml"), {
|
||||
myUserId: chatPage.myUserId,
|
||||
headerDescription: qsTr("Forward %n messages", "dialog header", ids.length).arg(ids.length),
|
||||
payload: {fromChatId: chatId, messageIds:ids, neededPermissions: neededPermissions},
|
||||
state: "forwardMessages"
|
||||
|
|
|
@ -29,6 +29,7 @@ Dialog {
|
|||
canAccept: false
|
||||
acceptDestinationAction: PageStackAction.Replace
|
||||
acceptDestinationReplaceTarget: pageStack.find( function(page){ return(page._depth === 0)} )
|
||||
property int myUserId: tdLibWrapper.getUserInformation().id;
|
||||
property alias headerTitle: pageHeader.title
|
||||
property alias headerDescription: pageHeader.description
|
||||
/*
|
||||
|
@ -66,7 +67,7 @@ Dialog {
|
|||
|
||||
model: chatListModel
|
||||
delegate: ChatListViewItem {
|
||||
ownUserId: overviewPage.ownUserId
|
||||
ownUserId: chatSelectionPage.myUserId
|
||||
Loader { // checking permissions takes a while, so we defer those calculations
|
||||
id: visibleLoader
|
||||
asynchronous: true
|
||||
|
@ -105,13 +106,13 @@ Dialog {
|
|||
}
|
||||
|
||||
property bool valid: visibleLoader && visibleLoader.item && visibleLoader.item.visible
|
||||
opacity: valid ? 1.0 : 0.5
|
||||
opacity: valid ? 1.0 : 0
|
||||
|
||||
Behavior on opacity { FadeAnimation {}}
|
||||
Behavior on height { NumberAnimation {}}
|
||||
|
||||
// normal height while calculating, otherwise all elements get displayed at once
|
||||
height: !visibleLoader.item || visible ? contentHeight : 0
|
||||
height: !visibleLoader.item || valid ? contentHeight : 0
|
||||
enabled: valid
|
||||
onClicked: {
|
||||
var chat = tdLibWrapper.getChat(display.id);
|
||||
|
|
Loading…
Reference in a new issue