From e5e38315bea0d6fa04c7e1b7ab4b60b4688cac92 Mon Sep 17 00:00:00 2001 From: Rongjian Zhang Date: Wed, 13 Mar 2019 23:08:38 +0800 Subject: [PATCH] fix: repo name containing dot at notification screen --- lib/screens/notifications.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/screens/notifications.dart b/lib/screens/notifications.dart index 3b42ab1..20de053 100644 --- a/lib/screens/notifications.dart +++ b/lib/screens/notifications.dart @@ -10,7 +10,12 @@ import '../widgets/empty.dart'; import '../utils/utils.dart'; String getRepoKey(NotificationGroup group) { - return ('_' + group.owner + '_' + group.name).replaceAll('-', '__'); + // Add heading _ to fix number case + // - => __ + // . => ___ + return ('_' + group.owner + '_' + group.name) + .replaceAll('-', '__') + .replaceAll('.', '___'); } String getItemKey(NotificationPayload item) { @@ -171,6 +176,7 @@ $key: pullRequest(number: ${item.number}) { groupMap = await fetchNotifications(active); } catch (err) { error = err.toString(); + throw err; } finally { if (mounted) { setState(() {