Merge pull request #242 from monich/join-by-id
Added a few items to the Debug page
This commit is contained in:
commit
b9502d35ee
2 changed files with 34 additions and 1 deletions
|
@ -18,6 +18,7 @@
|
||||||
*/
|
*/
|
||||||
import QtQuick 2.6
|
import QtQuick 2.6
|
||||||
import Sailfish.Silica 1.0
|
import Sailfish.Silica 1.0
|
||||||
|
import WerkWolf.Fernschreiber 1.0
|
||||||
import "../components"
|
import "../components"
|
||||||
import "../js/twemoji.js" as Emoji
|
import "../js/twemoji.js" as Emoji
|
||||||
import "../js/functions.js" as Functions
|
import "../js/functions.js" as Functions
|
||||||
|
@ -41,6 +42,38 @@ Page {
|
||||||
description: "here be dragons"
|
description: "here be dragons"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SectionHeader {
|
||||||
|
text: "Chats"
|
||||||
|
}
|
||||||
|
|
||||||
|
TextSwitch {
|
||||||
|
checked: chatListModel.showAllChats
|
||||||
|
text: "Show all chats"
|
||||||
|
description: "Including the ones referenced by the chats you have joined."
|
||||||
|
automaticCheck: false
|
||||||
|
onClicked: chatListModel.showAllChats = !chatListModel.showAllChats
|
||||||
|
}
|
||||||
|
|
||||||
|
Row {
|
||||||
|
TextField {
|
||||||
|
id: chatId
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
width: column.width - joinButton.width - Theme.horizontalPageMargin
|
||||||
|
placeholderText: "Chat id"
|
||||||
|
labelVisible: false
|
||||||
|
EnterKey.iconSource: "image://theme/icon-m-enter-accept"
|
||||||
|
EnterKey.enabled: text.length > 0
|
||||||
|
EnterKey.onClicked: tdLibWrapper.joinChat(text)
|
||||||
|
}
|
||||||
|
Button {
|
||||||
|
id: joinButton
|
||||||
|
text: "Join by id"
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
enabled: chatId.text.length > 0
|
||||||
|
onClicked: tdLibWrapper.joinChat(chatId.text)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VerticalScrollDecorator {}
|
VerticalScrollDecorator {}
|
||||||
|
|
|
@ -495,7 +495,7 @@ void ChatListModel::addVisibleChat(ChatData *chat)
|
||||||
|
|
||||||
void ChatListModel::updateChatVisibility(const TDLibWrapper::Group *group)
|
void ChatListModel::updateChatVisibility(const TDLibWrapper::Group *group)
|
||||||
{
|
{
|
||||||
LOG("Updating chat visibility" << group->groupId);
|
LOG("Updating chat visibility" << (group ? qPrintable(QString::number(group->groupId)) : ""));
|
||||||
// See if any group has been removed from from view
|
// See if any group has been removed from from view
|
||||||
for (int i = 0; i < chatList.size(); i++) {
|
for (int i = 0; i < chatList.size(); i++) {
|
||||||
ChatData *chat = chatList.at(i);
|
ChatData *chat = chatList.at(i);
|
||||||
|
|
Loading…
Reference in a new issue