From 85355144f1c978f4cce2a902bba6d1e1c3de2ecf Mon Sep 17 00:00:00 2001 From: fufesou Date: Sun, 4 Oct 2026 21:40:18 -0700 Subject: [PATCH] fix: support legacy peers in privacy mode shortcut Signed-off-by: fufesou --- flutter/lib/models/shortcut_model.dart | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/flutter/lib/models/shortcut_model.dart b/flutter/lib/models/shortcut_model.dart index 77ba79787..7e9377ddc 100644 --- a/flutter/lib/models/shortcut_model.dart +++ b/flutter/lib/models/shortcut_model.dart @@ -591,6 +591,14 @@ void registerSessionShortcutActions( // mode 2 is on correctly turns mode 1 ON, instead of misreading the // "any-mode-active" state as "this-mode-active" and toggling OFF. ffi.shortcutModel.register(kShortcutActionPrivacyMode1, () { + if (ffi.ffiModel.pi + .platformAdditions[kPlatformAdditionsSupportedPrivacyModeImpl] == + null) { + // Older peers use the legacy option instead of a named implementation. + if (!checkPrivacyModeAllowed(kPrivacyModeImplMag)) return; + bind.sessionToggleOption(sessionId: sessionId, value: 'privacy-mode'); + return; + } final implKey = findPrivacyImpl('privacy_mode_impl_mag_tip'); if (implKey == null) return; if (!checkPrivacyModeAllowed(implKey)) return;