Skip to content

Commit

Permalink
Use block function for _debugSessionForTab
Browse files Browse the repository at this point in the history
  • Loading branch information
parlough committed Oct 17, 2024
1 parent 51dba6e commit 350ea9f
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions dwds/debug_extension/web/debug_session.dart
Original file line number Diff line number Diff line change
Expand Up @@ -651,13 +651,14 @@ Future<bool> _sendStopDebuggingMessage(
);
}

_DebugSession? _debugSessionForTab(int tabId, {required TabType type}) =>
switch (type) {
TabType.dartApp =>
_debugSessions.firstWhereOrNull((session) => session.appTabId == tabId),
TabType.devTools => _debugSessions
.firstWhereOrNull((session) => session.devToolsTabId == tabId)
};
_DebugSession? _debugSessionForTab(int tabId, {required TabType type}) {
return switch (type) {
TabType.dartApp =>
_debugSessions.firstWhereOrNull((session) => session.appTabId == tabId),
TabType.devTools => _debugSessions
.firstWhereOrNull((session) => session.devToolsTabId == tabId)
};
}

Future<bool> _authenticateUser(int tabId) async {
final isAlreadyAuthenticated = await _fetchIsAuthenticated(tabId);
Expand Down

0 comments on commit 350ea9f

Please sign in to comment.