Skip to content

Your Android phone and your Windows PC, working as one. Local-first, end-to-end encrypted, no account.

perf: banking app picker and message list updates; drop unused strings

Bee4157b90a9c65
diff --git a/android/app/src/main/kotlin/app/nectarlink/android/ui/settings/BankingPauseSettings.kt b/android/app/src/main/kotlin/app/nectarlink/android/ui/settings/BankingPauseSettings.kt
index 5f51188..812b969 100644
--- a/android/app/src/main/kotlin/app/nectarlink/android/ui/settings/BankingPauseSettings.kt
+++ b/android/app/src/main/kotlin/app/nectarlink/android/ui/settings/BankingPauseSettings.kt
@@ -12,6 +12,7 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.heightIn
+import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.lazy.LazyColumn
@@ -19,6 +20,7 @@ import androidx.compose.foundation.lazy.items
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.Button
import androidx.compose.material3.Checkbox
+import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.OutlinedButton
import androidx.compose.material3.OutlinedTextField
@@ -27,6 +29,7 @@ import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.produceState
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
@@ -44,6 +47,8 @@ import app.nectarlink.android.R
import app.nectarlink.android.banking.BankingPause
import app.nectarlink.android.banking.OpenWithPauseActivity
import app.nectarlink.android.elevated.Elevated
+import kotlinx.coroutines.Dispatchers
+import kotlinx.coroutines.withContext
/** An app the user can choose: package, name and a small icon. */
private data class Choosable(val pkg: String, val label: String, val icon: ImageBitmap?)
@@ -140,10 +145,14 @@ internal fun BankingPauseAccess() {
@Composable
private fun AppPicker(initial: Set<String>, onDone: (Set<String>) -> Unit, onCancel: () -> Unit) {
val context = LocalContext.current
- val apps = remember { launchableApps(context) }
+ // Every app's name and icon: read away from the main thread, which they
+ // held for the whole time the dialog took to open.
+ val apps by produceState<List<Choosable>?>(initialValue = null) {
+ value = withContext(Dispatchers.Default) { launchableApps(context) }
+ }
var selected by remember { mutableStateOf(initial) }
var query by remember { mutableStateOf("") }
- val shown = apps.filter { query.isBlank() || it.label.contains(query.trim(), ignoreCase = true) }
+ val shown = apps.orEmpty().filter { query.isBlank() || it.label.contains(query.trim(), ignoreCase = true) }
AlertDialog(
onDismissRequest = onCancel,
title = { Text(stringResource(R.string.banking_pick_title)) },
@@ -156,6 +165,13 @@ private fun AppPicker(initial: Set<String>, onDone: (Set<String>) -> Unit, onCan
label = { Text(stringResource(R.string.banking_search)) },
modifier = Modifier.fillMaxWidth(),
)
+ if (apps == null) {
+ Row(
+ horizontalArrangement = Arrangement.Center,
+ verticalAlignment = Alignment.CenterVertically,
+ modifier = Modifier.fillMaxWidth().height(120.dp),
+ ) { CircularProgressIndicator() }
+ }
LazyColumn(Modifier.heightIn(max = 360.dp)) {
items(shown, key = { it.pkg }) { app ->
val on = app.pkg in selected
diff --git a/android/app/src/main/res/values-de/strings.xml b/android/app/src/main/res/values-de/strings.xml
index 8db9f20..00a8931 100644
--- a/android/app/src/main/res/values-de/strings.xml
+++ b/android/app/src/main/res/values-de/strings.xml
@@ -182,7 +182,6 @@
<string name="clipboard_history_no_match">Keine Treffer für „%1$s“.</string>
<string name="clipboard_history_from">Von %1$s</string>
<string name="clipboard_history_sent_to">Gesendet an %1$s</string>
- <string name="clipboard_history_pinned">Angeheftet</string>
<string name="clipboard_history_image">Bild</string>
<string name="clipboard_history_copy">Kopieren</string>
<string name="clipboard_history_copied">In die Zwischenablage kopiert</string>
@@ -194,8 +193,6 @@
<string name="settings_clipboard_title">Zwischenablage</string>
<string name="settings_clipboard_suggestions">Aktionen für kopierten Text vorschlagen</string>
<string name="settings_clipboard_suggestions_hint">Aktionen für Text von deinem PC vorschlagen: Links öffnen, Karten, Anrufe, Sendungsverfolgung und E-Mail.</string>
- <string name="settings_clipboard_history">Zwischenablageverlauf speichern</string>
- <string name="settings_clipboard_history_hint">Speichert die letzten 50 Einträge verschlüsselt auf diesem Gerät. Passwörter und Einmalcodes werden niemals gespeichert.</string>
<string name="clip_received_from">Kopiert von %1$s</string>
<string name="clip_action_open">Öffnen</string>
<string name="clip_action_maps">In Karten öffnen</string>
@@ -279,8 +276,6 @@
<string name="action_disconnect">Trennen</string>
<string name="action_stop_reconnecting">Nicht mehr neu verbinden</string>
<string name="action_reconnect">Neu verbinden</string>
- <string name="action_more">Weitere Aktionen</string>
- <string name="action_less">Weniger Aktionen</string>
<string name="wake_waking">%1$s wird aufgeweckt…</string>
<string name="wake_timeout_title">%1$s ist noch nicht aufgewacht</string>
<string name="wake_timeout_text">Prüfe Folgendes:\n• Wake-on-LAN ist im BIOS/UEFI sowie in den Windows-Einstellungen des Netzwerkadapters aktiviert (Energieverwaltung und „Aktivierungsfunktion über Magic Packet“).\n• %1$s ist per LAN-Kabel verbunden, falls er heruntergefahren war (Aufwecken über WLAN funktioniert aus dem ausgeschalteten Zustand selten).\n• Dieses Gerät befindet sich im selben Netzwerk wie %1$s.</string>
@@ -310,7 +305,6 @@
<string name="channel_connection">Verbindung</string>
<string name="channel_ringing">Mein Gerät finden</string>
<string name="notification_connected_to">Verbunden mit %1$s</string>
- <string name="notification_connected_many">Mit %1$d PCs verbunden</string>
<plurals name="notification_connected_pcs">
<item quantity="one">Mit %1$d PC verbunden</item>
<item quantity="other">Mit %1$d PCs verbunden</item>
@@ -425,7 +419,6 @@
<!-- Deck (macro pad to PC) -->
<string name="action_deck_pc">Deck</string>
<string name="action_desk_pc">Tischuhr</string>
- <string name="deck_title">Deck</string>
<string name="deck_fullscreen">Vollbild</string>
<string name="deck_exit_fullscreen">Vollbild beenden</string>
<string name="deck_playing">Wiedergabe</string>
@@ -433,12 +426,10 @@
<string name="deck_muted">Stumm</string>
<string name="deck_live">Live</string>
<string name="deck_volume_percent">%1$d%%</string>
- <string name="deck_waiting">Deck von %1$s wird geladen…</string>
<string name="deck_empty_page">Noch keine Kacheln auf dieser Seite. Füge Kacheln in NectarLink auf %1$s hinzu.</string>
<string name="deck_commands_denied_title">Befehle auf %1$s erlauben</string>
<string name="deck_commands_denied_text">Um Shell-Befehle von diesem Gerät auszuführen, aktiviere „Deck-Befehle ausführen“ für dieses Gerät unter „NectarLink › Einstellungen › Geräte“ auf %1$s.</string>
<string name="deck_hint">Kacheln im Deck auf %1$s anpassen</string>
- <string name="pc_audio_title">PC-Audio</string>
<string name="pc_audio_volume">Lautstärke</string>
<string name="pc_audio_mute">Stummschalten</string>
<string name="pc_audio_unmute">Stummschaltung aufheben</string>
@@ -455,7 +446,6 @@
<string name="pc_audio_use_phone_mic_on">Der PC hört das Mikrofon dieses Geräts</string>
<!-- Phone storage in File Explorer -->
- <string name="settings_storage">Speicher im Datei-Explorer</string>
<string name="storage_all_files_title">Zugriff auf alle Dateien</string>
<string name="storage_all_files_on">Ein: Von dir autorisierte PCs können die Dateien dieses Geräts im Datei-Explorer durchsuchen, öffnen und kopieren.</string>
<string name="storage_all_files_off">Durchsuche die Ordner dieses Geräts im Datei-Explorer auf deinem PC. Benötigt „Zugriff auf alle Dateien“ oder wähle unten bestimmte Ordner aus.</string>
@@ -480,7 +470,6 @@
<string name="webcam_permission_title">Kamerazugriff erlauben</string>
<string name="webcam_permission_text">NectarLink verwendet die Kamera nur, während du Video als Webcam an %1$s streamst.</string>
<string name="webcam_allow_camera">Kamera erlauben</string>
- <string name="webcam_status_streaming">Streame %1$d × %2$d an %3$s</string>
<string name="webcam_status_connecting">Kamera wird mit %1$s verbunden…</string>
<string name="webcam_status_ready">Bereit zum Streamen an %1$s</string>
<string name="webcam_start">Webcam starten</string>
@@ -517,9 +506,6 @@
<string name="timeline_action_load_more">Mehr laden</string>
<string name="timeline_today">Heute</string>
<string name="timeline_yesterday">Gestern</string>
- <string name="settings_timeline_title">Zeitverlauf</string>
- <string name="settings_timeline_retention">Einträge im Zeitverlauf behalten</string>
- <string name="settings_timeline_retention_hint">Ältere Einträge automatisch entfernen oder bis zu 5.000 Einträge lokal auf diesem Gerät behalten.</string>
<string name="timeline_retention_30d">30 T.</string>
<string name="timeline_retention_90d">90 T.</string>
<string name="timeline_retention_1y">1 J.</string>
@@ -557,7 +543,6 @@
<string name="localsend_card_title">LocalSend in der Nähe</string>
<string name="localsend_card_empty">Noch keine LocalSend-Geräte in diesem WLAN gefunden.</string>
<string name="localsend_nearby_device">Gerät in der Nähe</string>
- <string name="transfer_requested_from">%1$s möchte Dateien senden</string>
<string name="action_accept">Annehmen</string>
<string name="action_decline">Ablehnen</string>
<string name="action_dismiss">Verwerfen</string>
diff --git a/android/app/src/main/res/values-zh-rCN/strings.xml b/android/app/src/main/res/values-zh-rCN/strings.xml
index 5b6d653..193b893 100644
--- a/android/app/src/main/res/values-zh-rCN/strings.xml
+++ b/android/app/src/main/res/values-zh-rCN/strings.xml
@@ -176,7 +176,6 @@
<string name="clipboard_history_no_match">没有与“%1$s”匹配的内容。</string>
<string name="clipboard_history_from">来自 %1$s</string>
<string name="clipboard_history_sent_to">已发送到 %1$s</string>
- <string name="clipboard_history_pinned">已固定</string>
<string name="clipboard_history_image">图片</string>
<string name="clipboard_history_copy">复制</string>
<string name="clipboard_history_copied">已复制到剪贴板</string>
@@ -188,8 +187,6 @@
<string name="settings_clipboard_title">剪贴板</string>
<string name="settings_clipboard_suggestions">为复制的文本推荐操作</string>
<string name="settings_clipboard_suggestions_hint">为来自电脑的文本推荐操作:打开链接、地图、拨号、快递和邮件。</string>
- <string name="settings_clipboard_history">保留剪贴板历史记录</string>
- <string name="settings_clipboard_history_hint">保留最近50条剪贴内容,加密保存在本手机上。密码和一次性验证码不会被保存。</string>
<string name="clip_received_from">复制自 %1$s</string>
<string name="clip_action_open">打开</string>
<string name="clip_action_maps">在地图中打开</string>
@@ -271,8 +268,6 @@
<string name="action_disconnect">断开连接</string>
<string name="action_stop_reconnecting">停止自动重连</string>
<string name="action_reconnect">重新连接</string>
- <string name="action_more">更多操作</string>
- <string name="action_less">收起操作</string>
<string name="wake_waking">正在唤醒 %1$s…</string>
<string name="wake_timeout_title">%1$s 尚未唤醒</string>
<string name="wake_timeout_text">请检查:\n• 已在 BIOS/UEFI 和 Windows 的网卡设置中启用网络唤醒(电源管理与“魔术封包唤醒”)。\n• 若 %1$s 是关机状态,请使用有线网络(关机状态下 Wi-Fi 唤醒通常无效)。\n• 本手机与 %1$s 处于同一网络。</string>
@@ -299,7 +294,6 @@
<string name="channel_connection">连接</string>
<string name="channel_ringing">查找我的手机</string>
<string name="notification_connected_to">已连接到 %1$s</string>
- <string name="notification_connected_many">已连接到 %1$d 台电脑</string>
<plurals name="notification_connected_pcs">
<item quantity="one">已连接到 %1$d 台电脑</item>
<item quantity="other">已连接到 %1$d 台电脑</item>
@@ -407,7 +401,6 @@
</plurals>
<string name="action_deck_pc">面板</string>
<string name="action_desk_pc">桌面时钟</string>
- <string name="deck_title">面板</string>
<string name="deck_fullscreen">全屏</string>
<string name="deck_exit_fullscreen">退出全屏</string>
<string name="deck_playing">播放中</string>
@@ -415,12 +408,10 @@
<string name="deck_muted">已静音</string>
<string name="deck_live">直播</string>
<string name="deck_volume_percent">%1$d%%</string>
- <string name="deck_waiting">正在加载 %1$s 的面板…</string>
<string name="deck_empty_page">此页面还没有磁贴。请在 %1$s 上的 NectarLink 中添加磁贴。</string>
<string name="deck_commands_denied_title">在 %1$s 上允许执行命令</string>
<string name="deck_commands_denied_text">要从本手机运行 shell 命令,请在 %1$s 上的 NectarLink › 设置 › 设备中为本手机开启“运行面板命令”。</string>
<string name="deck_hint">在 %1$s 的面板中自定义磁贴</string>
- <string name="pc_audio_title">电脑音频</string>
<string name="pc_audio_volume">音量</string>
<string name="pc_audio_mute">静音</string>
<string name="pc_audio_unmute">取消静音</string>
@@ -435,7 +426,6 @@
<string name="pc_audio_use_phone_mic">将手机用作麦克风</string>
<string name="pc_audio_use_phone_mic_sub">将此手机的麦克风发送到电脑</string>
<string name="pc_audio_use_phone_mic_on">电脑正在接收此手机的麦克风</string>
- <string name="settings_storage">文件资源管理器中的存储</string>
<string name="storage_all_files_title">所有文件访问权限</string>
<string name="storage_all_files_on">已开启。你允许的电脑可在文件资源管理器中浏览、打开和复制此手机的文件。</string>
<string name="storage_all_files_off">在电脑的文件资源管理器中浏览此手机的文件夹。需要“所有文件访问权限”,或在下方选择特定文件夹。</string>
@@ -458,7 +448,6 @@
<string name="webcam_permission_title">允许访问摄像头</string>
<string name="webcam_permission_text">仅当你将视频作为摄像头传输到 %1$s 时,NectarLink 才会使用摄像头。</string>
<string name="webcam_allow_camera">允许使用摄像头</string>
- <string name="webcam_status_streaming">正在以 %1$d × %2$d 传输到 %3$s</string>
<string name="webcam_status_connecting">正在将摄像头连接到 %1$s…</string>
<string name="webcam_status_ready">已准备好传输到 %1$s</string>
<string name="webcam_start">启动摄像头</string>
@@ -493,9 +482,6 @@
<string name="timeline_action_load_more">加载更多</string>
<string name="timeline_today">今天</string>
<string name="timeline_yesterday">昨天</string>
- <string name="settings_timeline_title">时间线</string>
- <string name="settings_timeline_retention">保留时间线条目</string>
- <string name="settings_timeline_retention_hint">自动移除较早的条目,或在此手机上本地保留最多 5,000 条。</string>
<string name="timeline_retention_30d">30 天</string>
<string name="timeline_retention_90d">90 天</string>
<string name="timeline_retention_1y">1 年</string>
@@ -529,7 +515,6 @@
<string name="localsend_card_title">附近的 LocalSend</string>
<string name="localsend_card_empty">此 Wi-Fi 网络上尚未发现 LocalSend 设备。</string>
<string name="localsend_nearby_device">附近设备</string>
- <string name="transfer_requested_from">%1$s 想要发送文件</string>
<string name="action_accept">接受</string>
<string name="action_decline">拒绝</string>
<string name="action_dismiss">忽略</string>
diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml
index c4c6db9..4ea3153 100644
--- a/android/app/src/main/res/values/strings.xml
+++ b/android/app/src/main/res/values/strings.xml
@@ -182,7 +182,6 @@
<string name="clipboard_history_no_match">Nothing matches “%1$s”.</string>
<string name="clipboard_history_from">From %1$s</string>
<string name="clipboard_history_sent_to">Sent to %1$s</string>
- <string name="clipboard_history_pinned">Pinned</string>
<string name="clipboard_history_image">Image</string>
<string name="clipboard_history_copy">Copy</string>
<string name="clipboard_history_copied">Copied to clipboard</string>
@@ -194,8 +193,6 @@
<string name="settings_clipboard_title">Clipboard</string>
<string name="settings_clipboard_suggestions">Suggest actions for copied text</string>
<string name="settings_clipboard_suggestions_hint">Suggest actions for text from your PC: open links, maps, calls, parcels and email.</string>
- <string name="settings_clipboard_history">Keep clipboard history</string>
- <string name="settings_clipboard_history_hint">Keeps the last 50 clips, encrypted on this phone. Passwords and one-time codes are never saved.</string>
<string name="clip_received_from">Copied from %1$s</string>
<string name="clip_action_open">Open</string>
<string name="clip_action_maps">Open in Maps</string>
@@ -279,8 +276,6 @@
<string name="action_disconnect">Disconnect</string>
<string name="action_stop_reconnecting">Stop reconnecting</string>
<string name="action_reconnect">Reconnect</string>
- <string name="action_more">More actions</string>
- <string name="action_less">Fewer actions</string>
<string name="wake_waking">Waking %1$s…</string>
<string name="wake_timeout_title">%1$s hasn\'t woken up yet</string>
<string name="wake_timeout_text">Check that:\n• Wake-on-LAN is enabled in BIOS/UEFI and in the network adapter\'s settings in Windows (Power Management and Wake on Magic Packet).\n• %1$s is on Ethernet if it was shut down (Wi-Fi wake rarely works from shutdown).\n• This phone is on the same network as %1$s.</string>
@@ -310,7 +305,6 @@
<string name="channel_connection">Connection</string>
<string name="channel_ringing">Find my phone</string>
<string name="notification_connected_to">Connected to %1$s</string>
- <string name="notification_connected_many">Connected to %1$d PCs</string>
<plurals name="notification_connected_pcs">
<item quantity="one">Connected to %1$d PC</item>
<item quantity="other">Connected to %1$d PCs</item>
@@ -425,7 +419,6 @@
<!-- Deck (macro pad to PC) -->
<string name="action_deck_pc">Deck</string>
<string name="action_desk_pc">Desk clock</string>
- <string name="deck_title">Deck</string>
<string name="deck_fullscreen">Full screen</string>
<string name="deck_exit_fullscreen">Exit full screen</string>
<string name="deck_playing">Playing</string>
@@ -433,12 +426,10 @@
<string name="deck_muted">Muted</string>
<string name="deck_live">Live</string>
<string name="deck_volume_percent">%1$d%%</string>
- <string name="deck_waiting">Loading %1$s\'s Deck…</string>
<string name="deck_empty_page">No tiles on this page yet. Add tiles in NectarLink on %1$s.</string>
<string name="deck_commands_denied_title">Allow commands on %1$s</string>
<string name="deck_commands_denied_text">To run shell commands from this phone, turn on “Run Deck commands” for this phone in NectarLink › Settings › Devices on %1$s.</string>
<string name="deck_hint">Customize tiles in Deck on %1$s</string>
- <string name="pc_audio_title">PC audio</string>
<string name="pc_audio_volume">Volume</string>
<string name="pc_audio_mute">Mute</string>
<string name="pc_audio_unmute">Unmute</string>
@@ -455,7 +446,6 @@
<string name="pc_audio_use_phone_mic_on">The PC hears this phone\'s microphone</string>
<!-- Phone storage in File Explorer -->
- <string name="settings_storage">Storage in File Explorer</string>
<string name="storage_all_files_title">All files access</string>
<string name="storage_all_files_on">On. PCs you allow can browse, open and copy this phone\'s files in File Explorer.</string>
<string name="storage_all_files_off">Browse this phone\'s folders in File Explorer on your PC. Needs All files access, or pick specific folders below.</string>
@@ -480,7 +470,6 @@
<string name="webcam_permission_title">Allow camera access</string>
<string name="webcam_permission_text">NectarLink uses the camera only while you stream video to %1$s as a webcam.</string>
<string name="webcam_allow_camera">Allow camera</string>
- <string name="webcam_status_streaming">Streaming %1$d × %2$d to %3$s</string>
<string name="webcam_status_connecting">Connecting camera to %1$s…</string>
<string name="webcam_status_ready">Ready to stream to %1$s</string>
<string name="webcam_start">Start webcam</string>
@@ -517,9 +506,6 @@
<string name="timeline_action_load_more">Load more</string>
<string name="timeline_today">Today</string>
<string name="timeline_yesterday">Yesterday</string>
- <string name="settings_timeline_title">Timeline</string>
- <string name="settings_timeline_retention">Keep timeline items</string>
- <string name="settings_timeline_retention_hint">Automatically remove older items, or keep up to 5,000 items locally on this phone.</string>
<string name="timeline_retention_30d">30d</string>
<string name="timeline_retention_90d">90d</string>
<string name="timeline_retention_1y">1y</string>
@@ -557,7 +543,6 @@
<string name="localsend_card_title">LocalSend nearby</string>
<string name="localsend_card_empty">No LocalSend devices found on this Wi-Fi network yet.</string>
<string name="localsend_nearby_device">Nearby device</string>
- <string name="transfer_requested_from">%1$s wants to send files</string>
<string name="action_accept">Accept</string>
<string name="action_decline">Decline</string>
<string name="action_dismiss">Dismiss</string>
diff --git a/desktop/app/src/bridge/messages.rs b/desktop/app/src/bridge/messages.rs
index ad11ac0..03af185 100644
--- a/desktop/app/src/bridge/messages.rs
+++ b/desktop/app/src/bridge/messages.rs
@@ -166,14 +166,16 @@ impl qobject::Messages {
return;
}
let last = self.rust().last.clone();
- let differs = |f: fn(&messages::View) -> String| last.as_ref().is_none_or(|l| f(l) != f(&view));
+ // Compared as values: printing both lists to compare them cost more than the update.
+ let differs =
+ |f: fn(&messages::View) -> &serde_json::Value| last.as_ref().is_none_or(|l| f(l) != f(&view));
self.as_mut().set_device(QString::from(&view.device.map(|d| d.to_string()).unwrap_or_default()));
self.as_mut().set_status(QString::from(view.status.as_str()));
- if differs(|v| v.threads.to_string()) {
+ if differs(|v| &v.threads) {
self.as_mut().set_threads(QString::from(&view.threads.to_string()));
}
self.as_mut().set_thread(QString::from(view.thread.as_deref().unwrap_or_default()));
- if differs(|v| v.messages.to_string()) {
+ if differs(|v| &v.messages) {
self.as_mut().set_messages(QString::from(&view.messages.to_string()));
}
self.as_mut().set_more(view.more);
@@ -182,7 +184,7 @@ impl qobject::Messages {
self.as_mut().set_compose_to(QString::from(view.compose_to.as_deref().unwrap_or_default()));
self.as_mut().set_compose_name(QString::from(view.compose_name.as_deref().unwrap_or_default()));
self.as_mut().set_app_filter(QString::from(&view.app_filter));
- if differs(|v| v.available_apps.to_string()) {
+ if differs(|v| &v.available_apps) {
self.as_mut().set_available_apps(QString::from(&view.available_apps.to_string()));
}
self.as_mut().set_has_chat_threads(view.has_chat_threads);
diff --git a/desktop/app/src/pc_mirror.rs b/desktop/app/src/pc_mirror.rs
index c3653c6..f09817e 100644
--- a/desktop/app/src/pc_mirror.rs
+++ b/desktop/app/src/pc_mirror.rs
@@ -2233,7 +2233,7 @@ mod imp {
/// Play on phone does.
#[cfg(windows)]
#[test]
- #[ignore]
+ #[ignore = "needs a browser tab titled NECTARLINK_TEST_TAB"]
fn captures_a_browsers_video() {
use crate::win::browser::{Automation, window_for};
let wanted = std::env::var("NECTARLINK_TEST_TAB").expect("NECTARLINK_TEST_TAB");
diff --git a/desktop/app/src/win/browser.rs b/desktop/app/src/win/browser.rs
index 2115a56..9a27a52 100644
--- a/desktop/app/src/win/browser.rs
+++ b/desktop/app/src/win/browser.rs
@@ -430,7 +430,7 @@ mod tests {
/// With a Chromium browser showing a page whose title has
/// `NECTARLINK_TEST_TAB` in it: reads its address and its video's place.
#[test]
- #[ignore]
+ #[ignore = "needs a browser tab titled NECTARLINK_TEST_TAB"]
fn reads_a_real_browser() {
let wanted = std::env::var("NECTARLINK_TEST_TAB").expect("NECTARLINK_TEST_TAB");
// SAFETY: COM for this test's thread.
diff --git a/desktop/app/src/win/h264.rs b/desktop/app/src/win/h264.rs
index 430e02f..a083408 100644
--- a/desktop/app/src/win/h264.rs
+++ b/desktop/app/src/win/h264.rs
@@ -669,7 +669,7 @@ mod tests {
}
#[test]
- #[ignore]
+ #[ignore = "benchmark"]
fn bench_to_bgrx_4k() {
let (w, h) = (3840u32, 2160u32);
let stride = w as usize;
@@ -773,7 +773,7 @@ mod tests {
}
#[test]
- #[ignore]
+ #[ignore = "benchmark; needs BENCH_4K_H264"]
fn bench_decode_4k() {
let path = std::env::var("BENCH_4K_H264").expect("BENCH_4K_H264");
let stream = std::fs::read(path).unwrap();
diff --git a/desktop/app/src/win/http.rs b/desktop/app/src/win/http.rs
index b0184f5..ed78823 100644
--- a/desktop/app/src/win/http.rs
+++ b/desktop/app/src/win/http.rs
@@ -328,7 +328,7 @@ mod tests {
/// Needs the internet: `cargo test -- --ignored`.
#[test]
- #[ignore]
+ #[ignore = "needs the internet"]
fn fetches_over_https() {
let body = get("https://api.github.com/repos/rust-lang/rust", 1024 * 1024).unwrap();
assert!(String::from_utf8_lossy(&body).contains("\"full_name\""));
@@ -338,7 +338,7 @@ mod tests {
/// Needs the internet: resumes a download from the middle.
#[test]
- #[ignore]
+ #[ignore = "needs the internet"]
fn resumes_a_download() {
let url = "https://github.com/thtbee/nectarlink/releases/download/v0.1.0/SHA256SUMS.txt";
let dir = tempfile::tempdir().unwrap();
@@ -356,7 +356,7 @@ mod tests {
mod release_download {
/// Needs the internet: the real installer, as an update downloads it.
#[test]
- #[ignore]
+ #[ignore = "needs the internet"]
fn downloads_a_release_installer() {
let url =
"https://github.com/thtbee/nectarlink/releases/download/v0.1.2/Nectarlink-0.1.2-x64-setup.exe";
diff --git a/desktop/app/src/win/window_capture.rs b/desktop/app/src/win/window_capture.rs
index c2ee891..10c8f93 100644
--- a/desktop/app/src/win/window_capture.rs
+++ b/desktop/app/src/win/window_capture.rs
@@ -301,7 +301,7 @@ mod tests {
/// `NECTARLINK_TEST_TAB` in it: captures its window's video, covered
/// or not, and writes it to `NECTARLINK_TEST_DUMP` (raw BGRA) if set.
#[test]
- #[ignore]
+ #[ignore = "needs a browser tab titled NECTARLINK_TEST_TAB"]
fn captures_a_window_behind_others() {
use crate::win::browser::{Automation, frame_of, use_physical_pixels, window_for};
let wanted = std::env::var("NECTARLINK_TEST_TAB").expect("NECTARLINK_TEST_TAB");