From 122ac4bd892059af206d7558f7b209e5c836a3f9 Mon Sep 17 00:00:00 2001 From: Chris Bobbe Date: Tue, 14 May 2024 15:55:13 -0600 Subject: [PATCH] internal_link [nfc]: Narrow a type a little bit --- lib/model/internal_link.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/model/internal_link.dart b/lib/model/internal_link.dart index 91cb1c6df1..7276225603 100644 --- a/lib/model/internal_link.dart +++ b/lib/model/internal_link.dart @@ -4,6 +4,7 @@ import 'package:json_annotation/json_annotation.dart'; import '../api/model/narrow.dart'; import 'narrow.dart'; import 'store.dart'; +import 'stream.dart'; part 'internal_link.g.dart'; @@ -238,7 +239,7 @@ enum _NarrowOperator { /// /// Returns null if the operand has an unexpected shape, or has the old shape /// (stream name but no ID) and we don't know of a stream by the given name. -int? _parseStreamOperand(String operand, PerAccountStore store) { +int? _parseStreamOperand(String operand, StreamStore store) { // "New" (2018) format: ${stream_id}-${stream_name} . final match = RegExp(r'^(\d+)(?:-.*)?$').firstMatch(operand); final newFormatStreamId = (match != null) ? int.parse(match.group(1)!, radix: 10) : null;