Don't animate ChatPage transition when notification is tapped
And simplified unrolling of the page stack.
This commit is contained in:
parent
11a1018ad9
commit
96dcbdde22
1 changed files with 3 additions and 13 deletions
|
@ -48,10 +48,8 @@ Page {
|
||||||
onPleaseOpenMessage: {
|
onPleaseOpenMessage: {
|
||||||
console.log("[OverviewPage] Opening chat from external call...")
|
console.log("[OverviewPage] Opening chat from external call...")
|
||||||
if (chatListCreated) {
|
if (chatListCreated) {
|
||||||
if (status !== PageStatus.Active) {
|
pageStack.pop(overviewPage, PageStackAction.Immediate)
|
||||||
pageStack.pop(pageStack.find( function(page){ return(page._depth === 0)} ), PageStackAction.Immediate);
|
pageStack.push(Qt.resolvedUrl("../pages/ChatPage.qml"), { "chatInformation" : tdLibWrapper.getChat(chatId) }, PageStackAction.Immediate)
|
||||||
}
|
|
||||||
pageStack.push(Qt.resolvedUrl("../pages/ChatPage.qml"), { "chatInformation" : tdLibWrapper.getChat(chatId) });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -154,9 +152,7 @@ Page {
|
||||||
}
|
}
|
||||||
onChatReceived: {
|
onChatReceived: {
|
||||||
if(chat["@extra"] === "openDirectly") {
|
if(chat["@extra"] === "openDirectly") {
|
||||||
if (status !== PageStatus.Active) {
|
pageStack.pop(overviewPage, PageStackAction.Immediate)
|
||||||
pageStack.pop(pageStack.find( function(page){ return(page._depth === 0)} ), PageStackAction.Immediate);
|
|
||||||
}
|
|
||||||
// if we get a new chat (no messages?), we can not use the provided data
|
// if we get a new chat (no messages?), we can not use the provided data
|
||||||
pageStack.push(Qt.resolvedUrl("../pages/ChatPage.qml"), { "chatInformation" : tdLibWrapper.getChat(chat.id) });
|
pageStack.push(Qt.resolvedUrl("../pages/ChatPage.qml"), { "chatInformation" : tdLibWrapper.getChat(chat.id) });
|
||||||
}
|
}
|
||||||
|
@ -277,13 +273,7 @@ Page {
|
||||||
size: BusyIndicatorSize.Large
|
size: BusyIndicatorSize.Large
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue