Merge lp:~cellsoftware/telegram-app/1517626 into lp:telegram-app

Proposed by Paz Chauhan
Status: Needs review
Proposed branch: lp:~cellsoftware/telegram-app/1517626
Merge into: lp:telegram-app
Diff against target: 22 lines (+5/-0)
1 file modified
telegram/app/qml/components/DialogsListItem.qml (+5/-0)
To merge this branch: bzr merge lp:~cellsoftware/telegram-app/1517626
Reviewer Review Type Date Requested Status
libqtelegram team Pending
Review via email: mp+297452@code.launchpad.net

Description of the change

The following changes need to be made in the library:

In telegram.cpp (found in deps/libqtelegram-ae) change method messagesCreateEncryptedChat to the following:

qint64 Telegram::messagesCreateEncryptedChat(const InputUser &user) {

    qCDebug(TG_LIB_SECRET) << "creating new encrypted chat";
    // generate a new object where store all the needed secret chat data
    SecretChat *secretChat = new SecretChat(prv->mSettings);
    secretChat->setAdminId(prv->mSettings->ourId());
    secretChat->setParticipantId(user.userId());
    secretChat->setRequestedUser(user);
    return generateGAorB(secretChat);
}

In telegramqml.cpp (found in deps/TelegramQML) change method refreshSecretChats to the following:

void TelegramQml::refreshSecretChats()
{
    if(!p->tsettings)
        return;

    const QList<SecretChat*> &secrets = p->tsettings->secretChats();
    Q_FOREACH(SecretChat *sc, secrets)
    {

        EncryptedChat chat(EncryptedChat::typeEncryptedChat);

        if (sc->date() == 0)
            chat.setClassType(EncryptedChat::typeEncryptedChatWaiting);

        chat.setAccessHash(sc->accessHash());
        chat.setAdminId(sc->adminId());
        chat.setDate(sc->date());
        chat.setGAOrB(sc->gAOrB());
        chat.setId(sc->chatId());
        chat.setKeyFingerprint(sc->keyFingerprint());
        chat.setParticipantId(sc->participantId());

        insertEncryptedChat(chat);
    }
}

To post a comment you must log in.
204. By Paz Chauhan

State change to Chat Waiting commented out

205. By Paz Chauhan

State change to Chat Waiting code uncommented

206. By Paz Chauhan

.po and .pot files reverted

Unmerged revisions

206. By Paz Chauhan

.po and .pot files reverted

205. By Paz Chauhan

State change to Chat Waiting code uncommented

204. By Paz Chauhan

State change to Chat Waiting commented out

203. By Paz Chauhan

.po and .pot files reverted

202. By Paz Chauhan

Changes made in the library, back-end and QML layers

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'telegram/app/qml/components/DialogsListItem.qml'
2--- telegram/app/qml/components/DialogsListItem.qml 2016-05-16 06:52:04 +0000
3+++ telegram/app/qml/components/DialogsListItem.qml 2016-06-15 12:11:27 +0000
4@@ -41,6 +41,7 @@
5 // in delegate -- selected: currentDialog == dialog
6 property bool selected: false
7
8+ property real typeMessageActionEmpty: 0xb6aef7b0
9 property real typeMessageActionChatCreate: 0xa6638b9a
10 property real typeMessageActionChatAddUser: 0x5e3cfc4b
11 property real typeMessageActionChatDeleteUser: 0xb2ae9b0c
12@@ -250,6 +251,10 @@
13 res = i18n.tr("<font color=\"DarkBlue\">%1 joined the group via invite link</font>").arg(fromUserName)
14 break
15
16+ case typeMessageActionEmpty:
17+ res = i18n.tr("<font color=\"DarkBlue\">%1 is currently offline</font>").arg(title);
18+ break;
19+
20 default:
21 break
22 }

Subscribers

People subscribed via source and target branches

to status/vote changes: