mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-03 22:35:45 +02:00
ChatViewFooter : use Escape for closing box
Closing emoji box, record box and location box by pressing Esc Key Using opened that already exists instead of creating isOpen GitLab: #1197 Change-Id: I8461a7f2e8acaffe4ab66647d3e98701c608f270
This commit is contained in:
parent
3383f43688
commit
d7200cc8a3
4 changed files with 22 additions and 1 deletions
|
@ -217,6 +217,20 @@ Rectangle {
|
|||
messageBar.textAreaObj.clearText();
|
||||
MessagesAdapter.replyToId = "";
|
||||
}
|
||||
|
||||
Keys.onShortcutOverride: function (keyEvent) {
|
||||
if (keyEvent.key === Qt.Key_Escape) {
|
||||
if (emojiPicker != null && emojiPicker.opened) {
|
||||
emojiPicker.closeEmojiPicker();
|
||||
}
|
||||
else if (recordBox != null && recordBox.opened) {
|
||||
recordBox.closeRecorder();
|
||||
}
|
||||
else if (PositionManager.isMapActive(CurrentAccount.id)){
|
||||
PositionManager.setMapInactive(CurrentAccount.id)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FilesToSendContainer {
|
||||
|
|
|
@ -261,6 +261,13 @@ PositionManager::unPinMap(const QString& key)
|
|||
}
|
||||
}
|
||||
|
||||
bool
|
||||
PositionManager::isMapActive(const QString& key)
|
||||
{
|
||||
QMutexLocker lk(&mapStatusMutex_);
|
||||
return (mapStatus_.find(key) != mapStatus_.end());
|
||||
}
|
||||
|
||||
void
|
||||
PositionManager::pinMap(const QString& key)
|
||||
{
|
||||
|
|
|
@ -77,6 +77,7 @@ protected:
|
|||
Q_INVOKABLE void unPinMap(const QString& key);
|
||||
Q_INVOKABLE void setMapActive(const QString& key);
|
||||
Q_INVOKABLE void setMapInactive(const QString& key);
|
||||
Q_INVOKABLE bool isMapActive(const QString& key);
|
||||
Q_INVOKABLE void sharePosition(int maximumTime, const QString& accountId, const QString& convId);
|
||||
Q_INVOKABLE void stopSharingPosition(const QString& accountId = "", const QString& convId = "");
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@ Popup {
|
|||
id: root
|
||||
|
||||
required property ListView listView
|
||||
|
||||
signal emojiIsPicked(string content)
|
||||
|
||||
// Close the picker when attached to a listView that receives height/scroll
|
||||
|
|
Loading…
Add table
Reference in a new issue