Merge remote-tracking branch 'origin/master' into searching
This commit is contained in:
commit
a0a2e6bdca
4 changed files with 42 additions and 15 deletions
|
@ -153,7 +153,7 @@ Item {
|
|||
asynchronous: true
|
||||
visible: status === Image.Ready ? true : false
|
||||
layer.enabled: videoMessageComponent.highlighted
|
||||
layer.effect: PressEffect { source: singleImage }
|
||||
layer.effect: PressEffect { source: placeholderImage }
|
||||
}
|
||||
|
||||
BackgroundImage {
|
||||
|
@ -161,7 +161,6 @@ Item {
|
|||
}
|
||||
|
||||
Rectangle {
|
||||
id: placeholderBackground
|
||||
color: "black"
|
||||
opacity: 0.3
|
||||
height: parent.height
|
||||
|
@ -241,7 +240,6 @@ Item {
|
|||
}
|
||||
|
||||
Rectangle {
|
||||
id: videoErrorShade
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
color: "lightgrey"
|
||||
|
|
|
@ -16,8 +16,7 @@ var re = /(?:\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[
|
|||
|
||||
// avoid using a string literal like '\u200D' here because minifiers expand it inline
|
||||
U200D = String.fromCharCode(0x200D),
|
||||
basePath = Qt.resolvedUrl("./emoji/"),
|
||||
ampersandRe = /\&(?!amp;)/g;
|
||||
basePath = Qt.resolvedUrl("./emoji/");
|
||||
|
||||
function toCodePoint(unicodeSurrogates) {
|
||||
var
|
||||
|
@ -41,15 +40,13 @@ function toCodePoint(unicodeSurrogates) {
|
|||
|
||||
function emojify(str, emojiSize) {
|
||||
return String(str).replace(re, function (rawText) {
|
||||
var ret = rawText,
|
||||
iconId = toCodePoint(rawText.indexOf(U200D) < 0 ?
|
||||
var iconId = toCodePoint(rawText.indexOf(U200D) < 0 ?
|
||||
rawText.replace(UFE0Fg, '') :
|
||||
rawText
|
||||
);
|
||||
if (iconId) {
|
||||
rawText);
|
||||
return iconId ?
|
||||
// recycle the match string replacing the emoji
|
||||
// with its image counter part
|
||||
ret = '<img '.concat(
|
||||
'<img '.concat(
|
||||
'src="',
|
||||
basePath,
|
||||
iconId,
|
||||
|
@ -59,8 +56,7 @@ function emojify(str, emojiSize) {
|
|||
'" height="',
|
||||
Math.round(emojiSize * 6 / 5 ),
|
||||
'"/>'
|
||||
);
|
||||
) : rawText;
|
||||
}
|
||||
return ret.replace(ampersandRe, "&");
|
||||
});
|
||||
);
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
import QtQuick 2.6
|
||||
import Sailfish.Silica 1.0
|
||||
import WerkWolf.Fernschreiber 1.0
|
||||
import "../components"
|
||||
import "../js/twemoji.js" as Emoji
|
||||
import "../js/functions.js" as Functions
|
||||
|
@ -41,6 +42,38 @@ Page {
|
|||
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 {}
|
||||
|
|
|
@ -493,7 +493,7 @@ void ChatListModel::addVisibleChat(ChatData *chat)
|
|||
|
||||
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
|
||||
for (int i = 0; i < chatList.size(); i++) {
|
||||
ChatData *chat = chatList.at(i);
|
||||
|
|
Loading…
Reference in a new issue