1
0
mirror of https://github.com/git-touch/git-touch synced 2024-12-13 17:08:49 +01:00

fix: repo name containing dot at notification screen

This commit is contained in:
Rongjian Zhang 2019-03-13 23:08:38 +08:00
parent 76d8138716
commit e5e38315be

View File

@ -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(() {