Merge lp:~rmescandon/telegram-app/bugfix-1359669 into lp:~libqtelegram-team/telegram-app/qml-plugin

Proposed by Roberto Mier Escandon
Status: Merged
Merged at revision: 196
Proposed branch: lp:~rmescandon/telegram-app/bugfix-1359669
Merge into: lp:~libqtelegram-team/telegram-app/qml-plugin
Diff against target: 29 lines (+3/-3)
2 files modified
qmlplugin/models/messagesview.cpp (+2/-2)
qmlplugin/models/messagesview.h (+1/-1)
To merge this branch: bzr merge lp:~rmescandon/telegram-app/bugfix-1359669
Reviewer Review Type Date Requested Status
Michał Karnicki (community) Approve
Review via email: mp+231701@code.launchpad.net

Description of the change

Last changes in qml-plugin result in a bug that didn't load the db cached messages for a chat when that chat was related to a user. The reason is the "isChat" flag not well set in MessagesView

To post a comment you must log in.
Revision history for this message
Michał Karnicki (karni) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qmlplugin/models/messagesview.cpp'
2--- qmlplugin/models/messagesview.cpp 2014-08-18 18:49:11 +0000
3+++ qmlplugin/models/messagesview.cpp 2014-08-21 10:47:22 +0000
4@@ -20,10 +20,10 @@
5 #include "data.h"
6 #include "dbmanager.h"
7
8-MessagesView::MessagesView(qint32 dialogId, bool isChat, QObject *parent) :
9+MessagesView::MessagesView(qint32 dialogId, qint32 peerType, QObject *parent) :
10 QObject(parent),
11 mDialogId(dialogId),
12- mIsChat(isChat),
13+ mIsChat(peerType == InputPeer::typeInputPeerChat),
14 mQuery(DbManager::instance()->database()),
15 mPageSize(20),
16 mOffset(0)
17
18=== modified file 'qmlplugin/models/messagesview.h'
19--- qmlplugin/models/messagesview.h 2014-08-18 18:49:11 +0000
20+++ qmlplugin/models/messagesview.h 2014-08-21 10:47:22 +0000
21@@ -27,7 +27,7 @@
22 Q_OBJECT
23
24 public:
25- MessagesView(qint32 dialogId, bool isChat, QObject *parent = 0);
26+ MessagesView(qint32 dialogId, qint32 peerType, QObject *parent = 0);
27 ~MessagesView();
28
29 QList<MessageItem> nextPage();

Subscribers

People subscribed via source and target branches