From 9c0b0f64c455101d5ce826a69e122a8429554990 Mon Sep 17 00:00:00 2001 From: Rongjian Zhang Date: Sun, 6 Oct 2019 15:52:41 +0800 Subject: [PATCH] fix: refresh only if branch changes --- lib/screens/repository.dart | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/screens/repository.dart b/lib/screens/repository.dart index 52b786a..5728b5e 100644 --- a/lib/screens/repository.dart +++ b/lib/screens/repository.dart @@ -301,12 +301,14 @@ class RepositoryScreen extends StatelessWidget { text: (b['name'] as String))) .toList(), onClose: (result) { - Provider.of(context) - .pushReplacementRoute( - context, - (_) => RepositoryScreen(owner, name, - branch: result), - ); + if (result != branch) { + Provider.of(context) + .pushReplacementRoute( + context, + (_) => RepositoryScreen(owner, name, + branch: result), + ); + } }, ), );