Skip to content

Linux + iPhone Continuity / iMessage / SMS

feat: handle multiple files on daemon notifications

Zack Bartelfeeab240e916
diff --git a/po/cs.po b/po/cs.po
index d62cd92..3d26cd0 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-11-01 09:56-0800\n"
+"POT-Creation-Date: 2026-11-02 18:54-0800\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Czech\n"
@@ -1946,17 +1946,29 @@ msgstr ""
"příkazem: sudo systemctl enable --now avahi-daemon"
#: src/daemon/notification.cpp
-msgid "File arrived"
-msgstr "Soubor dorazil"
+#, c++-format
+msgid "{} file arrived"
+msgid_plural "{} files arrived"
+msgstr[0] "{} soubor přijat"
+msgstr[1] "{} soubory přijaty"
+msgstr[2] "{} souborů přijato"
#: src/daemon/notification.cpp
-msgid "Open File"
-msgstr "Otevřít soubor"
+msgid "Files arrived"
+msgstr "Soubory přijaty"
#: src/daemon/notification.cpp
msgid "Open Folder"
msgstr "Otevřít složku"
+#: src/daemon/notification.cpp
+msgid "File arrived"
+msgstr "Soubor dorazil"
+
+#: src/daemon/notification.cpp
+msgid "Open File"
+msgstr "Otevřít soubor"
+
#: src/daemon/notification.cpp
msgid "Reply"
msgstr "Odpovědět"
diff --git a/po/de.po b/po/de.po
index c5a3a45..553ed39 100644
--- a/po/de.po
+++ b/po/de.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-11-01 09:56-0800\n"
+"POT-Creation-Date: 2026-11-02 18:54-0800\n"
"PO-Revision-Date: 2026-08-22\n"
"Last-Translator: Tether project\n"
"Language-Team: German\n"
@@ -1993,17 +1993,28 @@ msgstr ""
"ankündigen. Starten Sie ihn mit: sudo systemctl enable --now avahi-daemon"
#: src/daemon/notification.cpp
-msgid "File arrived"
-msgstr "Datei empfangen"
+#, c++-format
+msgid "{} file arrived"
+msgid_plural "{} files arrived"
+msgstr[0] "{} Datei empfangen"
+msgstr[1] "{} Dateien empfangen"
#: src/daemon/notification.cpp
-msgid "Open File"
-msgstr "Datei öffnen"
+msgid "Files arrived"
+msgstr "Dateien empfangen"
#: src/daemon/notification.cpp
msgid "Open Folder"
msgstr "Ordner öffnen"
+#: src/daemon/notification.cpp
+msgid "File arrived"
+msgstr "Datei empfangen"
+
+#: src/daemon/notification.cpp
+msgid "Open File"
+msgstr "Datei öffnen"
+
#: src/daemon/notification.cpp
msgid "Reply"
msgstr "Antworten"
diff --git a/po/es.po b/po/es.po
index 5e0683d..4425284 100644
--- a/po/es.po
+++ b/po/es.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-11-01 09:56-0800\n"
+"POT-Creation-Date: 2026-11-02 18:54-0800\n"
"PO-Revision-Date: 2026-08-22\n"
"Last-Translator: Tether project\n"
"Language-Team: Spanish\n"
@@ -1975,17 +1975,28 @@ msgstr ""
"la red. Inícielo con: sudo systemctl enable --now avahi-daemon"
#: src/daemon/notification.cpp
-msgid "File arrived"
-msgstr "Archivo recibido"
+#, c++-format
+msgid "{} file arrived"
+msgid_plural "{} files arrived"
+msgstr[0] "{} archivo recibido"
+msgstr[1] "{} archivos recibidos"
#: src/daemon/notification.cpp
-msgid "Open File"
-msgstr "Abrir archivo"
+msgid "Files arrived"
+msgstr "Archivos recibidos"
#: src/daemon/notification.cpp
msgid "Open Folder"
msgstr "Abrir carpeta"
+#: src/daemon/notification.cpp
+msgid "File arrived"
+msgstr "Archivo recibido"
+
+#: src/daemon/notification.cpp
+msgid "Open File"
+msgstr "Abrir archivo"
+
#: src/daemon/notification.cpp
msgid "Reply"
msgstr "Responder"
diff --git a/po/fr.po b/po/fr.po
index ee5a634..1157dec 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-11-01 09:56-0800\n"
+"POT-Creation-Date: 2026-11-02 18:54-0800\n"
"PO-Revision-Date: 2026-08-22\n"
"Last-Translator: Tether project\n"
"Language-Team: French\n"
@@ -1982,17 +1982,28 @@ msgstr ""
"avahi-daemon"
#: src/daemon/notification.cpp
-msgid "File arrived"
-msgstr "Fichier reçu"
+#, c++-format
+msgid "{} file arrived"
+msgid_plural "{} files arrived"
+msgstr[0] "{} fichier reçu"
+msgstr[1] "{} fichiers reçus"
#: src/daemon/notification.cpp
-msgid "Open File"
-msgstr "Ouvrir le fichier"
+msgid "Files arrived"
+msgstr "Fichiers reçus"
#: src/daemon/notification.cpp
msgid "Open Folder"
msgstr "Ouvrir le dossier"
+#: src/daemon/notification.cpp
+msgid "File arrived"
+msgstr "Fichier reçu"
+
+#: src/daemon/notification.cpp
+msgid "Open File"
+msgstr "Ouvrir le fichier"
+
#: src/daemon/notification.cpp
msgid "Reply"
msgstr "Répondre"
diff --git a/po/it.po b/po/it.po
index 8b659b4..278ef10 100644
--- a/po/it.po
+++ b/po/it.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-11-01 09:56-0800\n"
+"POT-Creation-Date: 2026-11-02 18:54-0800\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Italian\n"
@@ -1972,17 +1972,28 @@ msgstr ""
"rete. Avvialo con: sudo systemctl enable --now avahi-daemon"
#: src/daemon/notification.cpp
-msgid "File arrived"
-msgstr "File ricevuto"
+#, c++-format
+msgid "{} file arrived"
+msgid_plural "{} files arrived"
+msgstr[0] "{} file ricevuto"
+msgstr[1] "{} file ricevuti"
#: src/daemon/notification.cpp
-msgid "Open File"
-msgstr "Apri file"
+msgid "Files arrived"
+msgstr "File ricevuti"
#: src/daemon/notification.cpp
msgid "Open Folder"
msgstr "Apri cartella"
+#: src/daemon/notification.cpp
+msgid "File arrived"
+msgstr "File ricevuto"
+
+#: src/daemon/notification.cpp
+msgid "Open File"
+msgstr "Apri file"
+
#: src/daemon/notification.cpp
msgid "Reply"
msgstr "Rispondi"
diff --git a/po/ja.po b/po/ja.po
index bb94451..eef10a9 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-11-01 09:56-0800\n"
+"POT-Creation-Date: 2026-11-02 18:54-0800\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Japanese\n"
@@ -1949,17 +1949,27 @@ msgstr ""
"daemon"
#: src/daemon/notification.cpp
-msgid "File arrived"
-msgstr "ファイルが届きました"
+#, c++-format
+msgid "{} file arrived"
+msgid_plural "{} files arrived"
+msgstr[0] "{} 個のファイルを受信しました"
#: src/daemon/notification.cpp
-msgid "Open File"
-msgstr "ファイルを開く"
+msgid "Files arrived"
+msgstr "ファイルを受信しました"
#: src/daemon/notification.cpp
msgid "Open Folder"
msgstr "フォルダを開く"
+#: src/daemon/notification.cpp
+msgid "File arrived"
+msgstr "ファイルが届きました"
+
+#: src/daemon/notification.cpp
+msgid "Open File"
+msgstr "ファイルを開く"
+
#: src/daemon/notification.cpp
msgid "Reply"
msgstr "返信"
diff --git a/po/ko.po b/po/ko.po
index 974b70c..f50505f 100644
--- a/po/ko.po
+++ b/po/ko.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-11-01 09:56-0800\n"
+"POT-Creation-Date: 2026-11-02 18:54-0800\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Korean\n"
@@ -1917,17 +1917,27 @@ msgstr ""
"다. 다음 명령으로 시작하십시오: sudo systemctl enable --now avahi-daemon"
#: src/daemon/notification.cpp
-msgid "File arrived"
-msgstr "파일이 도착했습니다"
+#, c++-format
+msgid "{} file arrived"
+msgid_plural "{} files arrived"
+msgstr[0] "파일 {}개를 받았습니다"
#: src/daemon/notification.cpp
-msgid "Open File"
-msgstr "파일 열기"
+msgid "Files arrived"
+msgstr "파일을 받았습니다"
#: src/daemon/notification.cpp
msgid "Open Folder"
msgstr "폴더 열기"
+#: src/daemon/notification.cpp
+msgid "File arrived"
+msgstr "파일이 도착했습니다"
+
+#: src/daemon/notification.cpp
+msgid "Open File"
+msgstr "파일 열기"
+
#: src/daemon/notification.cpp
msgid "Reply"
msgstr "답장"
diff --git a/po/nl.po b/po/nl.po
index f8237d7..daf6d80 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-11-01 09:56-0800\n"
+"POT-Creation-Date: 2026-11-02 18:54-0800\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Dutch\n"
@@ -1967,17 +1967,28 @@ msgstr ""
"aankondigen. Start het met: sudo systemctl enable --now avahi-daemon"
#: src/daemon/notification.cpp
-msgid "File arrived"
-msgstr "Bestand ontvangen"
+#, c++-format
+msgid "{} file arrived"
+msgid_plural "{} files arrived"
+msgstr[0] "{} bestand ontvangen"
+msgstr[1] "{} bestanden ontvangen"
#: src/daemon/notification.cpp
-msgid "Open File"
-msgstr "Bestand openen"
+msgid "Files arrived"
+msgstr "Bestanden ontvangen"
#: src/daemon/notification.cpp
msgid "Open Folder"
msgstr "Map openen"
+#: src/daemon/notification.cpp
+msgid "File arrived"
+msgstr "Bestand ontvangen"
+
+#: src/daemon/notification.cpp
+msgid "Open File"
+msgstr "Bestand openen"
+
#: src/daemon/notification.cpp
msgid "Reply"
msgstr "Antwoorden"
diff --git a/po/pl.po b/po/pl.po
index 5fb6958..83125f8 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-11-01 09:56-0800\n"
+"POT-Creation-Date: 2026-11-02 18:54-0800\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Polish\n"
@@ -1967,17 +1967,29 @@ msgstr ""
"go poleceniem: sudo systemctl enable --now avahi-daemon"
#: src/daemon/notification.cpp
-msgid "File arrived"
-msgstr "Plik dotarł"
+#, c++-format
+msgid "{} file arrived"
+msgid_plural "{} files arrived"
+msgstr[0] "Odebrano {} plik"
+msgstr[1] "Odebrano {} pliki"
+msgstr[2] "Odebrano {} plików"
#: src/daemon/notification.cpp
-msgid "Open File"
-msgstr "Otwórz plik"
+msgid "Files arrived"
+msgstr "Odebrano pliki"
#: src/daemon/notification.cpp
msgid "Open Folder"
msgstr "Otwórz folder"
+#: src/daemon/notification.cpp
+msgid "File arrived"
+msgstr "Plik dotarł"
+
+#: src/daemon/notification.cpp
+msgid "Open File"
+msgstr "Otwórz plik"
+
#: src/daemon/notification.cpp
msgid "Reply"
msgstr "Odpowiedz"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index a458ecf..a301783 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-11-01 09:56-0800\n"
+"POT-Creation-Date: 2026-11-02 18:54-0800\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Brazilian Portuguese\n"
@@ -1968,17 +1968,28 @@ msgstr ""
"na rede. Inicie-o com: sudo systemctl enable --now avahi-daemon"
#: src/daemon/notification.cpp
-msgid "File arrived"
-msgstr "Arquivo recebido"
+#, c++-format
+msgid "{} file arrived"
+msgid_plural "{} files arrived"
+msgstr[0] "{} arquivo recebido"
+msgstr[1] "{} arquivos recebidos"
#: src/daemon/notification.cpp
-msgid "Open File"
-msgstr "Abrir arquivo"
+msgid "Files arrived"
+msgstr "Arquivos recebidos"
#: src/daemon/notification.cpp
msgid "Open Folder"
msgstr "Abrir pasta"
+#: src/daemon/notification.cpp
+msgid "File arrived"
+msgstr "Arquivo recebido"
+
+#: src/daemon/notification.cpp
+msgid "Open File"
+msgstr "Abrir arquivo"
+
#: src/daemon/notification.cpp
msgid "Reply"
msgstr "Responder"
diff --git a/po/ru.po b/po/ru.po
index 82ec596..f5b5ba9 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-11-01 09:56-0800\n"
+"POT-Creation-Date: 2026-11-02 18:54-0800\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Russian\n"
@@ -1964,17 +1964,29 @@ msgstr ""
"Запустите его командой: sudo systemctl enable --now avahi-daemon"
#: src/daemon/notification.cpp
-msgid "File arrived"
-msgstr "Файл получен"
+#, c++-format
+msgid "{} file arrived"
+msgid_plural "{} files arrived"
+msgstr[0] "Получен {} файл"
+msgstr[1] "Получено {} файла"
+msgstr[2] "Получено {} файлов"
#: src/daemon/notification.cpp
-msgid "Open File"
-msgstr "Открыть файл"
+msgid "Files arrived"
+msgstr "Файлы получены"
#: src/daemon/notification.cpp
msgid "Open Folder"
msgstr "Открыть папку"
+#: src/daemon/notification.cpp
+msgid "File arrived"
+msgstr "Файл получен"
+
+#: src/daemon/notification.cpp
+msgid "Open File"
+msgstr "Открыть файл"
+
#: src/daemon/notification.cpp
msgid "Reply"
msgstr "Ответить"
diff --git a/po/sv.po b/po/sv.po
index fdea8a3..515f3a2 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-11-01 09:56-0800\n"
+"POT-Creation-Date: 2026-11-02 18:54-0800\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Swedish\n"
@@ -1947,17 +1947,28 @@ msgstr ""
"Starta den med: sudo systemctl enable --now avahi-daemon"
#: src/daemon/notification.cpp
-msgid "File arrived"
-msgstr "Fil mottagen"
+#, c++-format
+msgid "{} file arrived"
+msgid_plural "{} files arrived"
+msgstr[0] "{} fil mottagen"
+msgstr[1] "{} filer mottagna"
#: src/daemon/notification.cpp
-msgid "Open File"
-msgstr "Öppna fil"
+msgid "Files arrived"
+msgstr "Filer mottagna"
#: src/daemon/notification.cpp
msgid "Open Folder"
msgstr "Öppna mapp"
+#: src/daemon/notification.cpp
+msgid "File arrived"
+msgstr "Fil mottagen"
+
+#: src/daemon/notification.cpp
+msgid "Open File"
+msgstr "Öppna fil"
+
#: src/daemon/notification.cpp
msgid "Reply"
msgstr "Svara"
diff --git a/po/tether.pot b/po/tether.pot
index 954f49f..99157d4 100644
--- a/po/tether.pot
+++ b/po/tether.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether 0.3.2\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-11-01 09:56-0800\n"
+"POT-Creation-Date: 2026-11-02 18:54-0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -1739,17 +1739,28 @@ msgid ""
msgstr ""
#: src/daemon/notification.cpp
-msgid "File arrived"
-msgstr ""
+#, c++-format
+msgid "{} file arrived"
+msgid_plural "{} files arrived"
+msgstr[0] ""
+msgstr[1] ""
#: src/daemon/notification.cpp
-msgid "Open File"
+msgid "Files arrived"
msgstr ""
#: src/daemon/notification.cpp
msgid "Open Folder"
msgstr ""
+#: src/daemon/notification.cpp
+msgid "File arrived"
+msgstr ""
+
+#: src/daemon/notification.cpp
+msgid "Open File"
+msgstr ""
+
#: src/daemon/notification.cpp
msgid "Reply"
msgstr ""
diff --git a/po/tr.po b/po/tr.po
index 4270db8..9623ac5 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-11-01 09:56-0800\n"
+"POT-Creation-Date: 2026-11-02 18:54-0800\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Turkish\n"
@@ -1942,17 +1942,28 @@ msgstr ""
"komutla başlatın: sudo systemctl enable --now avahi-daemon"
#: src/daemon/notification.cpp
-msgid "File arrived"
-msgstr "Dosya geldi"
+#, c++-format
+msgid "{} file arrived"
+msgid_plural "{} files arrived"
+msgstr[0] "{} dosya alındı"
+msgstr[1] "{} dosya alındı"
#: src/daemon/notification.cpp
-msgid "Open File"
-msgstr "Dosyayı aç"
+msgid "Files arrived"
+msgstr "Dosyalar alındı"
#: src/daemon/notification.cpp
msgid "Open Folder"
msgstr "Klasörü aç"
+#: src/daemon/notification.cpp
+msgid "File arrived"
+msgstr "Dosya geldi"
+
+#: src/daemon/notification.cpp
+msgid "Open File"
+msgstr "Dosyayı aç"
+
#: src/daemon/notification.cpp
msgid "Reply"
msgstr "Yanıtla"
diff --git a/po/uk.po b/po/uk.po
index 0463547..a15a58f 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-11-01 09:56-0800\n"
+"POT-Creation-Date: 2026-11-02 18:54-0800\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Ukrainian\n"
@@ -1962,17 +1962,29 @@ msgstr ""
"Запустіть його командою: sudo systemctl enable --now avahi-daemon"
#: src/daemon/notification.cpp
-msgid "File arrived"
-msgstr "Файл надійшов"
+#, c++-format
+msgid "{} file arrived"
+msgid_plural "{} files arrived"
+msgstr[0] "Отримано {} файл"
+msgstr[1] "Отримано {} файли"
+msgstr[2] "Отримано {} файлів"
#: src/daemon/notification.cpp
-msgid "Open File"
-msgstr "Відкрити файл"
+msgid "Files arrived"
+msgstr "Файли отримано"
#: src/daemon/notification.cpp
msgid "Open Folder"
msgstr "Відкрити теку"
+#: src/daemon/notification.cpp
+msgid "File arrived"
+msgstr "Файл надійшов"
+
+#: src/daemon/notification.cpp
+msgid "Open File"
+msgstr "Відкрити файл"
+
#: src/daemon/notification.cpp
msgid "Reply"
msgstr "Відповісти"
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 246578d..e9cb8ae 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tether\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-11-01 09:56-0800\n"
+"POT-Creation-Date: 2026-11-02 18:54-0800\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Simplified Chinese\n"
@@ -1862,17 +1862,27 @@ msgstr ""
"sudo systemctl enable --now avahi-daemon"
#: src/daemon/notification.cpp
-msgid "File arrived"
-msgstr "文件已送达"
+#, c++-format
+msgid "{} file arrived"
+msgid_plural "{} files arrived"
+msgstr[0] "已收到 {} 个文件"
#: src/daemon/notification.cpp
-msgid "Open File"
-msgstr "打开文件"
+msgid "Files arrived"
+msgstr "已收到文件"
#: src/daemon/notification.cpp
msgid "Open Folder"
msgstr "打开文件夹"
+#: src/daemon/notification.cpp
+msgid "File arrived"
+msgstr "文件已送达"
+
+#: src/daemon/notification.cpp
+msgid "Open File"
+msgstr "打开文件"
+
#: src/daemon/notification.cpp
msgid "Reply"
msgstr "回复"
diff --git a/src/daemon/notification.cpp b/src/daemon/notification.cpp
index 6082dbd..0969098 100644
--- a/src/daemon/notification.cpp
+++ b/src/daemon/notification.cpp
@@ -7,6 +7,7 @@
#include <glib.h>
#include <libnotify/notify.h>
+#include <chrono>
#include <functional>
#include <mutex>
#include <string>
@@ -116,6 +117,12 @@ namespace tether {
// iPhone notification UID -> its open popup
std::unordered_map<uint32_t, NotifyNotification*> g_ancs_popups;
+ // Open "File arrived" popup that a burst of transfers folds into.
+ constexpr auto FILE_BATCH_WINDOW = std::chrono::seconds(10);
+ NotifyNotification* g_file_popup = nullptr;
+ int g_file_count = 0;
+ std::chrono::steady_clock::time_point g_last_file_arrival;
+
guint32 notification_id(NotifyNotification* notification) {
gint id = 0;
g_object_get(notification, "id", &id, nullptr);
@@ -279,6 +286,8 @@ namespace tether {
void on_notification_closed(NotifyNotification* notification, gpointer) {
g_reply_threads.erase(notification_id(notification));
std::erase_if(g_ancs_popups, [notification](const auto& entry) { return entry.second == notification; });
+ if (notification == g_file_popup)
+ g_file_popup = nullptr;
g_object_unref(notification);
}
@@ -310,6 +319,27 @@ namespace tether {
return G_SOURCE_REMOVE;
}
+ const auto now = std::chrono::steady_clock::now();
+ if (g_file_popup && now - g_last_file_arrival < FILE_BATCH_WINDOW) {
+ g_last_file_arrival = now;
+ ++g_file_count;
+ const std::string body =
+ tr_format(P_("{} file arrived", "{} files arrived", g_file_count), g_file_count);
+ notify_notification_update(g_file_popup, _("Files arrived"), body.c_str(), "document-save");
+ notify_notification_clear_actions(g_file_popup);
+ notify_notification_add_action(g_file_popup,
+ "open-folder",
+ _("Open Folder"),
+ on_notification_action,
+ new NotificationActionData{folder_uri},
+ free_action_data);
+ if (!notify_notification_show(g_file_popup, nullptr))
+ debug::log(ERR, "Failed to update file notification");
+ g_free(file_uri);
+ g_free(folder_uri);
+ return G_SOURCE_REMOVE;
+ }
+
NotifyNotification* notification =
notify_notification_new(_("File arrived"), file.filename().c_str(), "document-save");
@@ -336,6 +366,10 @@ namespace tether {
}
debug::log(ERR, "");
g_object_unref(notification);
+ } else {
+ g_file_popup = notification;
+ g_file_count = 1;
+ g_last_file_arrival = now;
}
g_free(file_uri);
g_free(folder_uri);