Merge commit '6fb6e86b6cb4be8d3d5f4c89ed0861ae130462eb' into pipelines/run-20261112-0233-settings-as-one-grouped-page-3e5f
This commit is contained in:
@@ -46,6 +46,23 @@ class ServerConnections extends ChangeNotifier {
|
||||
return true;
|
||||
}
|
||||
|
||||
String? _chatOpenId;
|
||||
|
||||
/// A chat the user opened from a notification. The tap is the user's own
|
||||
/// interaction, so the chat it opens is read; a route restored without a tap
|
||||
/// never sets this.
|
||||
void requestChatOpen(String sessionId) {
|
||||
_chatOpenId = sessionId;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
/// Consumes the notification open of [sessionId], once.
|
||||
bool takeChatOpenIntent(String sessionId) {
|
||||
if (sessionId.isEmpty || sessionId != _chatOpenId) return false;
|
||||
_chatOpenId = null;
|
||||
return true;
|
||||
}
|
||||
|
||||
/// Keep the intent outside the app that selecting another machine disposes.
|
||||
Future<bool> requestNewChat(String id) async {
|
||||
if (_busy || _disposed) return false;
|
||||
|
||||
Reference in New Issue
Block a user