diff --git a/qml/components/PhotoTextsListItem.qml b/qml/components/PhotoTextsListItem.qml
index f5fbb4b..a728053 100644
--- a/qml/components/PhotoTextsListItem.qml
+++ b/qml/components/PhotoTextsListItem.qml
@@ -33,15 +33,14 @@ ListItem {
height: contentColumn.height
spacing: Theme.paddingMedium
- Column {
- id: pictureColumn
+ ShaderEffectSource {
+ id: pictureItem
width: contentColumn.height - Theme.paddingSmall
height: contentColumn.height - Theme.paddingSmall
anchors.verticalCenter: parent.verticalCenter
-
- Item {
- width: parent.width
- height: parent.width
+ sourceItem: Item {
+ width: pictureItem.width
+ height: pictureItem.width
ProfileThumbnail {
id: pictureThumbnail
@@ -93,7 +92,7 @@ ListItem {
Column {
id: contentColumn
- width: mainColumn.width - pictureColumn.width - mainRow.spacing
+ width: mainColumn.width - pictureItem.width - mainRow.spacing
spacing: Theme.paddingSmall
Row {
diff --git a/qml/pages/ChatPage.qml b/qml/pages/ChatPage.qml
index dc1c50f..f5f0aeb 100644
--- a/qml/pages/ChatPage.qml
+++ b/qml/pages/ChatPage.qml
@@ -243,6 +243,10 @@ Page {
} else {
tdLibWrapper.sendTextMessage(chatInformation.id, newMessageTextField.text, newMessageColumn.replyToMessageId);
}
+
+ if(appSettings.focusTextAreaAfterSend) {
+ lostFocusTimer.start();
+ }
}
controlSendButton();
newMessageInReplyToRow.inReplyToMessage = null;
@@ -373,7 +377,9 @@ Page {
}
Component.onDestruction: {
- tdLibWrapper.setChatDraftMessage(chatInformation.id, 0, newMessageColumn.replyToMessageId, newMessageTextField.text);
+ if (chatPage.canSendMessages) {
+ tdLibWrapper.setChatDraftMessage(chatInformation.id, 0, newMessageColumn.replyToMessageId, newMessageTextField.text);
+ }
tdLibWrapper.closeChat(chatInformation.id);
}
@@ -1528,7 +1534,9 @@ Page {
if (appSettings.sendByEnter) {
sendMessage();
newMessageTextField.text = "";
- newMessageTextField.focus = false;
+ if(!appSettings.focusTextAreaAfterSend) {
+ newMessageTextField.focus = false;
+ }
}
}
@@ -1568,7 +1576,9 @@ Page {
onClicked: {
sendMessage();
newMessageTextField.text = "";
- newMessageTextField.focus = false;
+ if(!appSettings.focusTextAreaAfterSend) {
+ newMessageTextField.focus = false;
+ }
}
}
}
diff --git a/qml/pages/SearchChatsPage.qml b/qml/pages/SearchChatsPage.qml
index 82fe385..3e0571b 100644
--- a/qml/pages/SearchChatsPage.qml
+++ b/qml/pages/SearchChatsPage.qml
@@ -175,13 +175,13 @@ Page {
onBasicGroupFullInfoUpdated: {
if (foundChatListDelegate.isBasicGroup && groupId.toString() === foundChatListDelegate.foundChatInformation.type.basic_group_id.toString()) {
- foundChatListItem.secondaryText.text = qsTr("%1 members").arg(Number(groupFullInfo.members.length).toLocaleString(Qt.locale(), "f", 0));
+ foundChatListItem.secondaryText.text = qsTr("%1 members", "", groupFullInfo.members.length).arg(Number(groupFullInfo.members.length).toLocaleString(Qt.locale(), "f", 0));
foundChatListItem.tertiaryText.text = Emoji.emojify(groupFullInfo.description, foundChatListItem.tertiaryText.font.pixelSize, "../js/emoji/");
}
}
onBasicGroupFullInfoReceived: {
if (foundChatListDelegate.isBasicGroup && groupId.toString() === foundChatListDelegate.foundChatInformation.type.basic_group_id.toString()) {
- foundChatListItem.secondaryText.text = qsTr("%1 members").arg(Number(groupFullInfo.members.length).toLocaleString(Qt.locale(), "f", 0));
+ foundChatListItem.secondaryText.text = qsTr("%1 members", "", groupFullInfo.members.length).arg(Number(groupFullInfo.members.length).toLocaleString(Qt.locale(), "f", 0));
foundChatListItem.tertiaryText.text = Emoji.emojify(groupFullInfo.description, foundChatListItem.tertiaryText.font.pixelSize, "../js/emoji/");
}
}
@@ -189,9 +189,9 @@ Page {
onSupergroupFullInfoUpdated: {
if (foundChatListDelegate.isSupergroup && groupId.toString() === foundChatListDelegate.foundChatInformation.type.supergroup_id.toString()) {
if (foundChatListDelegate.relatedInformation.is_channel) {
- foundChatListItem.secondaryText.text = qsTr("%1 subscribers").arg(Number(groupFullInfo.member_count).toLocaleString(Qt.locale(), "f", 0));
+ foundChatListItem.secondaryText.text = qsTr("%1 subscribers", "", groupFullInfo.member_count).arg(Number(groupFullInfo.member_count).toLocaleString(Qt.locale(), "f", 0));
} else {
- foundChatListItem.secondaryText.text = qsTr("%1 members").arg(Number(groupFullInfo.member_count).toLocaleString(Qt.locale(), "f", 0));
+ foundChatListItem.secondaryText.text = qsTr("%1 members", "", groupFullInfo.member_count).arg(Number(groupFullInfo.member_count).toLocaleString(Qt.locale(), "f", 0));
}
foundChatListItem.tertiaryText.text = Emoji.emojify(groupFullInfo.description, foundChatListItem.tertiaryText.font.pixelSize, "../js/emoji/");
}
@@ -199,9 +199,9 @@ Page {
onSupergroupFullInfoReceived: {
if (foundChatListDelegate.isSupergroup && groupId.toString() === foundChatListDelegate.foundChatInformation.type.supergroup_id.toString()) {
if (foundChatListDelegate.relatedInformation.is_channel) {
- foundChatListItem.secondaryText.text = qsTr("%1 subscribers").arg(Number(groupFullInfo.member_count).toLocaleString(Qt.locale(), "f", 0));
+ foundChatListItem.secondaryText.text = qsTr("%1 subscribers", "", groupFullInfo.member_count).arg(Number(groupFullInfo.member_count).toLocaleString(Qt.locale(), "f", 0));
} else {
- foundChatListItem.secondaryText.text = qsTr("%1 members").arg(Number(groupFullInfo.member_count).toLocaleString(Qt.locale(), "f", 0));
+ foundChatListItem.secondaryText.text = qsTr("%1 members", "", groupFullInfo.member_count).arg(Number(groupFullInfo.member_count).toLocaleString(Qt.locale(), "f", 0));
}
foundChatListItem.tertiaryText.text = Emoji.emojify(groupFullInfo.description, foundChatListItem.tertiaryText.font.pixelSize, "../js/emoji/");
}
diff --git a/qml/pages/SettingsPage.qml b/qml/pages/SettingsPage.qml
index e9abe19..800d5ef 100644
--- a/qml/pages/SettingsPage.qml
+++ b/qml/pages/SettingsPage.qml
@@ -52,6 +52,16 @@ Page {
}
}
+ TextSwitch {
+ checked: appSettings.focusTextAreaAfterSend
+ text: qsTr("Focus text input area after send")
+ description: qsTr("Focus the text input area after sending a message")
+ automaticCheck: false
+ onClicked: {
+ appSettings.focusTextAreaAfterSend = !checked
+ }
+ }
+
TextSwitch {
checked: appSettings.useOpenWith
text: qsTr("Open-with menu integration")
diff --git a/src/appsettings.cpp b/src/appsettings.cpp
index 497578f..0924a42 100644
--- a/src/appsettings.cpp
+++ b/src/appsettings.cpp
@@ -22,6 +22,7 @@
namespace {
const QString KEY_SEND_BY_ENTER("sendByEnter");
+ const QString KEY_FOCUS_TEXTAREA_AFTER_SEND("focusTextAreaAfterSend");
const QString KEY_USE_OPEN_WITH("useOpenWith");
const QString KEY_SHOW_STICKERS_AS_IMAGES("showStickersAsImages");
const QString KEY_ANIMATE_STICKERS("animateStickers");
@@ -48,6 +49,20 @@ void AppSettings::setSendByEnter(bool sendByEnter)
}
}
+bool AppSettings::getFocusTextAreaAfterSend() const
+{
+ return settings.value(KEY_FOCUS_TEXTAREA_AFTER_SEND, false).toBool();
+}
+
+void AppSettings::setFocusTextAreaAfterSend(bool focusTextAreaAfterSend)
+{
+ if (getFocusTextAreaAfterSend() != focusTextAreaAfterSend) {
+ LOG(KEY_FOCUS_TEXTAREA_AFTER_SEND << focusTextAreaAfterSend);
+ settings.setValue(KEY_FOCUS_TEXTAREA_AFTER_SEND, focusTextAreaAfterSend);
+ emit focusTextAreaAfterSendChanged();
+ }
+}
+
bool AppSettings::getUseOpenWith() const
{
return settings.value(KEY_USE_OPEN_WITH, true).toBool();
diff --git a/src/appsettings.h b/src/appsettings.h
index bb63cdf..a040e60 100644
--- a/src/appsettings.h
+++ b/src/appsettings.h
@@ -24,6 +24,7 @@
class AppSettings : public QObject {
Q_OBJECT
Q_PROPERTY(bool sendByEnter READ getSendByEnter WRITE setSendByEnter NOTIFY sendByEnterChanged)
+ Q_PROPERTY(bool focusTextAreaAfterSend READ getFocusTextAreaAfterSend WRITE setFocusTextAreaAfterSend NOTIFY focusTextAreaAfterSendChanged)
Q_PROPERTY(bool useOpenWith READ getUseOpenWith WRITE setUseOpenWith NOTIFY useOpenWithChanged)
Q_PROPERTY(bool showStickersAsImages READ showStickersAsImages WRITE setShowStickersAsImages NOTIFY showStickersAsImagesChanged)
Q_PROPERTY(bool animateStickers READ animateStickers WRITE setAnimateStickers NOTIFY animateStickersChanged)
@@ -45,6 +46,9 @@ public:
bool getSendByEnter() const;
void setSendByEnter(bool sendByEnter);
+ bool getFocusTextAreaAfterSend() const;
+ void setFocusTextAreaAfterSend(bool focusTextAreaAfterSend);
+
bool getUseOpenWith() const;
void setUseOpenWith(bool useOpenWith);
@@ -65,6 +69,7 @@ public:
signals:
void sendByEnterChanged();
+ void focusTextAreaAfterSendChanged();
void useOpenWithChanged();
void showStickersAsImagesChanged();
void animateStickersChanged();
diff --git a/translations/harbour-fernschreiber-de.ts b/translations/harbour-fernschreiber-de.ts
index e871efc..10db4a5 100644
--- a/translations/harbour-fernschreiber-de.ts
+++ b/translations/harbour-fernschreiber-de.ts
@@ -1296,13 +1296,19 @@
Kanal
-
+
- %1 Mitglied
+
+ %1 Mitglied
+ %1 Mitglieder
+
-
+
- %1 Abonnent
+
+ %1 Abonnent
+ %1 Abonnenten
+
@@ -1391,6 +1397,14 @@
Speicheroptimierer einschalten
+
+
+ Texteingabe nach Senden fokussieren
+
+
+
+ Fokussiert die Texteingabe nach Senden einer Nachricht
+
StickerPicker
diff --git a/translations/harbour-fernschreiber-en.ts b/translations/harbour-fernschreiber-en.ts
index 6e943e0..ffaad43 100644
--- a/translations/harbour-fernschreiber-en.ts
+++ b/translations/harbour-fernschreiber-en.ts
@@ -1296,13 +1296,19 @@
Channel
-
+
- %1 member
+
+ %1 member
+ %1 members
+
-
+
- %1 subscriber
+
+ %1 subscriber
+ %1 subscribers
+
@@ -1391,6 +1397,14 @@
Enable storage optimizer
+
+
+ Focus text input area after send
+
+
+
+ Focus the text input area after sending a message
+
StickerPicker
@@ -1810,21 +1824,21 @@
- has added %1 to the chat
+ has added %1 to the chat
- has removed %1 from the chat
+ has removed %1 from the chat
myself
- have added %1 to the chat
+ have added %1 to the chat
myself
- have removed %1 from the chat
+ have removed %1 from the chat
diff --git a/translations/harbour-fernschreiber-es.ts b/translations/harbour-fernschreiber-es.ts
index 06060e9..57c7541 100644
--- a/translations/harbour-fernschreiber-es.ts
+++ b/translations/harbour-fernschreiber-es.ts
@@ -263,15 +263,15 @@
-
+ Marcar como no leído
-
+ Borrador
-
+ Marcar como leído
@@ -395,11 +395,11 @@
-
+ Buscar en charla
-
+ Buscar
@@ -777,21 +777,21 @@
-
+ ha añadido %1 a charla
-
+ ha quitado %1 de charla
myself
-
+ ha añadido %1 a la charla
myself
-
+ ha quitado %1 de charla
@@ -828,7 +828,7 @@
- Marcar número de teléfono para continuar.
+ Marcar el número de teléfono para continuar.
@@ -876,7 +876,7 @@
- Usar el formato internacional %1
+ Usa el formato internacional %1
@@ -902,7 +902,7 @@
- Copiar mensaje
+ Copiar
@@ -922,7 +922,7 @@
- Seleccionar mensaje
+ Seleccionar
@@ -930,11 +930,11 @@
- Desanclar mensaje
+ Mensaje desanclado
-
+ Desanclar mensaje
@@ -1055,19 +1055,19 @@
-
+ Filtrar las charlas...
-
+ Buscar charlas
- Bajada de %1 exitosa.
+ Bajada de %1 exitosa.
- Error al bajar
+ Error al bajar
@@ -1082,7 +1082,7 @@
- Desanclar mensaje
+ Mensaje desanclado
@@ -1259,43 +1259,47 @@
SearchChatsPage
-
+ No se han encontrado charlas.
-
+ Buscando charlas...
- Privado
+ Privado
-
+ Grupo
-
+ Canal
-
+
- %1 miembros
+
+ %1 miembros
+
-
+
- %1 suscriptores
+
+ %1 suscriptores
+
-
+ Buscar charlas
-
+ Buscar una charla...
-
+ Introducir la consulta para iniciar la búsqueda (se necesitan al menos 5 caracteres)
@@ -1372,6 +1376,14 @@
Optimizador de almacenamiento
+
+
+
+
+
+
+
+
StickerPicker
@@ -1791,21 +1803,21 @@
-
+ ha añadido %1 a la charla
-
+ ha quitado %1 de la charla
myself
-
+ ha añadido %1 a la charla
myself
-
+ ha añadido %1 de la charla
diff --git a/translations/harbour-fernschreiber-fi.ts b/translations/harbour-fernschreiber-fi.ts
index 83349c7..2739023 100644
--- a/translations/harbour-fernschreiber-fi.ts
+++ b/translations/harbour-fernschreiber-fi.ts
@@ -1297,13 +1297,19 @@
-
+
- %1 jäsen
+
+ %1 jäsen
+
+
-
+
- %1 tilaaja
+
+ %1 tilaaja
+
+
@@ -1392,6 +1398,14 @@
Käytä tallennustilan optimointia
+
+
+
+
+
+
+
+
StickerPicker
diff --git a/translations/harbour-fernschreiber-hu.ts b/translations/harbour-fernschreiber-hu.ts
index cbe6a16..630f4ae 100644
--- a/translations/harbour-fernschreiber-hu.ts
+++ b/translations/harbour-fernschreiber-hu.ts
@@ -1277,13 +1277,17 @@
-
+
- %1 tag
+
+ %1 tag
+
-
+
- %1 feliratkozott
+
+ %1 feliratkozott
+
@@ -1372,6 +1376,14 @@
+
+
+
+
+
+
+
+
StickerPicker
diff --git a/translations/harbour-fernschreiber-it.ts b/translations/harbour-fernschreiber-it.ts
index 85f802a..5c18e4c 100644
--- a/translations/harbour-fernschreiber-it.ts
+++ b/translations/harbour-fernschreiber-it.ts
@@ -1296,13 +1296,19 @@
-
+
- %1 membro
+
+ %1 membro
+
+
-
+
- %1 abbonato
+
+ %1 abbonato
+
+
@@ -1391,6 +1397,14 @@
Abilita ottimizzazione memoria
+
+
+
+
+
+
+
+
StickerPicker
diff --git a/translations/harbour-fernschreiber-pl.ts b/translations/harbour-fernschreiber-pl.ts
index 92fdc5f..dd55b46 100644
--- a/translations/harbour-fernschreiber-pl.ts
+++ b/translations/harbour-fernschreiber-pl.ts
@@ -1315,13 +1315,21 @@
-
+
- %1 członek
+
+ %1 członek
+
+
+
-
+
- %1 subskrybent
+
+ %1 subskrybent
+
+
+
@@ -1410,6 +1418,14 @@
Włącz optymalizację pamięci
+
+
+
+
+
+
+
+
StickerPicker
diff --git a/translations/harbour-fernschreiber-ru.ts b/translations/harbour-fernschreiber-ru.ts
index 481f829..0edb938 100644
--- a/translations/harbour-fernschreiber-ru.ts
+++ b/translations/harbour-fernschreiber-ru.ts
@@ -1315,13 +1315,21 @@
-
+
- %1 участников
+
+ %1 участников
+
+
+
-
+
- %1 подписчиков
+
+ %1 подписчиков
+
+
+
@@ -1410,6 +1418,14 @@
Включить оптимизацию хранилища
+
+
+
+
+
+
+
+
StickerPicker
diff --git a/translations/harbour-fernschreiber-sv.ts b/translations/harbour-fernschreiber-sv.ts
index e3d44d2..2a159af 100644
--- a/translations/harbour-fernschreiber-sv.ts
+++ b/translations/harbour-fernschreiber-sv.ts
@@ -1296,13 +1296,19 @@
Kanal
-
+
- %1 medlemmar
+
+ %1 medlemmar
+
+
-
+
- %1 prenumeranter
+
+ %1 prenumeranter
+
+
@@ -1391,6 +1397,14 @@
Aktivera lagringsoptimering
+
+
+
+
+
+
+
+
StickerPicker
diff --git a/translations/harbour-fernschreiber-zh_CN.ts b/translations/harbour-fernschreiber-zh_CN.ts
index c938305..44d8a9e 100644
--- a/translations/harbour-fernschreiber-zh_CN.ts
+++ b/translations/harbour-fernschreiber-zh_CN.ts
@@ -1277,13 +1277,17 @@
-
+
- %1 位成员
+
+ %1 位成员
+
-
+
- %1 位订阅者
+
+ %1 位订阅者
+
@@ -1372,6 +1376,14 @@
启用储存加速器
+
+
+
+
+
+
+
+
StickerPicker
diff --git a/translations/harbour-fernschreiber.ts b/translations/harbour-fernschreiber.ts
index b9adc5e..f0b5aa4 100644
--- a/translations/harbour-fernschreiber.ts
+++ b/translations/harbour-fernschreiber.ts
@@ -1296,13 +1296,19 @@
-
+
- %1 member
+
+ %1 member
+
+
-
+
- %1 subscriber
+
+ %1 subscriber
+
+
@@ -1391,6 +1397,14 @@
+
+
+
+
+
+
+
+
StickerPicker