mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-22 11:38:57 +00:00
fix(chat): fix gifs staying active in the background when switching chat
This commit is contained in:
parent
6deb900ac5
commit
9d2862a602
@ -49,14 +49,13 @@ Item {
|
|||||||
|
|
||||||
onIsActiveChannelChanged: {
|
onIsActiveChannelChanged: {
|
||||||
if (!isActiveChannel) {
|
if (!isActiveChannel) {
|
||||||
root.allMessagesLoaded = false
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// We wait to load all messages, because switching back to chats makes
|
// We wait to load all messages, because switching back to chats makes
|
||||||
// the scroll go crazy so it loads way too many messages making it slow
|
// the scroll go crazy so it loads way too many messages making it slow
|
||||||
timer.setTimeout(function() {
|
timer.setTimeout(function() {
|
||||||
root.allMessagesLoaded = true
|
root.allMessagesLoaded = true
|
||||||
}, 10);
|
}, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
@ -117,7 +116,6 @@ Item {
|
|||||||
text: qsTr("Loading...")
|
text: qsTr("Loading...")
|
||||||
}
|
}
|
||||||
StatusLoadingIndicator {
|
StatusLoadingIndicator {
|
||||||
color: Theme.palette.directColor4
|
|
||||||
anchors.left: loadingText.right
|
anchors.left: loadingText.right
|
||||||
anchors.leftMargin: 8
|
anchors.leftMargin: 8
|
||||||
}
|
}
|
||||||
@ -286,6 +284,7 @@ Item {
|
|||||||
channelEmoji: root.channelEmoji
|
channelEmoji: root.channelEmoji
|
||||||
emojiPopup: root.emojiPopup
|
emojiPopup: root.emojiPopup
|
||||||
|
|
||||||
|
isActiveChannel: root.isActiveChannel
|
||||||
isChatBlocked: root.isChatBlocked
|
isChatBlocked: root.isChatBlocked
|
||||||
messageContextMenu: messageContextMenuInst
|
messageContextMenu: messageContextMenuInst
|
||||||
|
|
||||||
|
@ -10,7 +10,8 @@ Item {
|
|||||||
property int imageWidth: 350
|
property int imageWidth: 350
|
||||||
property bool isCurrentUser: false
|
property bool isCurrentUser: false
|
||||||
property url source
|
property url source
|
||||||
property bool playing: Global.applicationWindow.active
|
property bool isActiveChannel: false
|
||||||
|
property bool playing: Global.applicationWindow.active && isChatActive
|
||||||
property bool isAnimated: !!source && source.toString().endsWith('.gif')
|
property bool isAnimated: !!source && source.toString().endsWith('.gif')
|
||||||
signal clicked(var image, var mouse)
|
signal clicked(var image, var mouse)
|
||||||
property var container
|
property var container
|
||||||
|
@ -27,6 +27,7 @@ Item {
|
|||||||
property var container
|
property var container
|
||||||
property int contentType
|
property int contentType
|
||||||
property bool isChatBlocked: false
|
property bool isChatBlocked: false
|
||||||
|
property bool isActiveChannel: false
|
||||||
|
|
||||||
property int chatHorizontalPadding: Style.current.halfPadding
|
property int chatHorizontalPadding: Style.current.halfPadding
|
||||||
property int chatVerticalPadding: 7
|
property int chatVerticalPadding: 7
|
||||||
@ -545,6 +546,7 @@ Item {
|
|||||||
playing: root.messageStore.playAnimation
|
playing: root.messageStore.playAnimation
|
||||||
imageSource: messageImage
|
imageSource: messageImage
|
||||||
imageWidth: 200
|
imageWidth: 200
|
||||||
|
isActiveChannel: root.isActiveChannel
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (mouse.button === Qt.LeftButton) {
|
if (mouse.button === Qt.LeftButton) {
|
||||||
root.imageClicked(image)
|
root.imageClicked(image)
|
||||||
|
@ -23,6 +23,7 @@ Column {
|
|||||||
property var contactsStore
|
property var contactsStore
|
||||||
property var messageContextMenu
|
property var messageContextMenu
|
||||||
property string channelEmoji
|
property string channelEmoji
|
||||||
|
property bool isActiveChannel: false
|
||||||
|
|
||||||
property var emojiPopup
|
property var emojiPopup
|
||||||
|
|
||||||
@ -337,6 +338,7 @@ Column {
|
|||||||
messageContextMenu: root.messageContextMenu
|
messageContextMenu: root.messageContextMenu
|
||||||
contentType: root.messageContentType
|
contentType: root.messageContentType
|
||||||
isChatBlocked: root.isChatBlocked
|
isChatBlocked: root.isChatBlocked
|
||||||
|
isActiveChannel: root.isActiveChannel
|
||||||
emojiPopup: root.emojiPopup
|
emojiPopup: root.emojiPopup
|
||||||
|
|
||||||
communityId: root.communityId
|
communityId: root.communityId
|
||||||
|
Loading…
x
Reference in New Issue
Block a user