Merge with master branch (notification hotfix)
This commit is contained in:
commit
fb2e0786c9
3 changed files with 11 additions and 2 deletions
|
@ -46,8 +46,8 @@ Page {
|
||||||
onPleaseOpenMessage: {
|
onPleaseOpenMessage: {
|
||||||
console.log("[OverviewPage] Opening chat from external call...")
|
console.log("[OverviewPage] Opening chat from external call...")
|
||||||
if (chatListCreated) {
|
if (chatListCreated) {
|
||||||
pageStack.pop(overviewPage, PageStackAction.Immediate);
|
pageStack.pop(overviewPage, PageStackAction.Immediate)
|
||||||
pageStack.push(Qt.resolvedUrl("../pages/ChatPage.qml"), { "chatInformation" : tdLibWrapper.getChat(chatId) }, PageStackAction.Immediate)
|
pageStack.push(Qt.resolvedUrl("../pages/ChatPage.qml"), { "chatInformation" : chatListModel.getById(chatId) }, PageStackAction.Immediate)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onPleaseOpenUrl: {
|
onPleaseOpenUrl: {
|
||||||
|
|
|
@ -386,6 +386,14 @@ QVariantMap ChatListModel::get(int row)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QVariantMap ChatListModel::getById(qlonglong chatId)
|
||||||
|
{
|
||||||
|
if (chatIndexMap.contains(chatId)) {
|
||||||
|
return chatList.value(chatIndexMap.value(chatId))->chatData;
|
||||||
|
}
|
||||||
|
return QVariantMap();
|
||||||
|
}
|
||||||
|
|
||||||
int ChatListModel::updateChatOrder(int chatIndex)
|
int ChatListModel::updateChatOrder(int chatIndex)
|
||||||
{
|
{
|
||||||
ChatData *chat = chatList.at(chatIndex);
|
ChatData *chat = chatList.at(chatIndex);
|
||||||
|
|
|
@ -38,6 +38,7 @@ public:
|
||||||
|
|
||||||
Q_INVOKABLE void redrawModel();
|
Q_INVOKABLE void redrawModel();
|
||||||
Q_INVOKABLE QVariantMap get(int row);
|
Q_INVOKABLE QVariantMap get(int row);
|
||||||
|
Q_INVOKABLE QVariantMap getById(qlonglong chatId);
|
||||||
|
|
||||||
bool showAllChats() const;
|
bool showAllChats() const;
|
||||||
void setShowAllChats(bool showAll);
|
void setShowAllChats(bool showAll);
|
||||||
|
|
Loading…
Reference in a new issue