Fix latency-probe races, stale offline menu, and byte formatting

This commit is contained in:
av
2026-07-18 15:36:40 +03:00
parent 629e031845
commit 7a8c2f238c
3 changed files with 35 additions and 8 deletions
+5 -2
View File
@@ -50,8 +50,9 @@ export default class SingBoxStatusPreferences extends ExtensionPreferences {
_entryRow(settings, key, title, subtitle) {
const row = new Adw.EntryRow({ title });
if (subtitle && row.set_subtitle) // EntryRow gained subtitle later; guard.
row.set_subtitle(subtitle);
// Adw.EntryRow has no subtitle; surface the hint as a tooltip instead.
if (subtitle)
row.set_tooltip_text(subtitle);
row.text = settings.get_string(key);
row.connect('changed', () => settings.set_string(key, row.text));
settings.connect(`changed::${key}`, () => {
@@ -64,6 +65,8 @@ export default class SingBoxStatusPreferences extends ExtensionPreferences {
_passwordRow(settings, key, title, subtitle) {
const row = new Adw.PasswordEntryRow({ title });
if (subtitle)
row.set_tooltip_text(subtitle);
row.text = settings.get_string(key);
row.connect('changed', () => settings.set_string(key, row.text));
settings.connect(`changed::${key}`, () => {