Merge pull request #1412 from ogayot/snaplist-fix-try-again

snaplist: fix crash when pressing "Try again" on snaplist
This commit is contained in:
Olivier Gayot 2022-09-12 11:25:14 +02:00 committed by GitHub
commit 0565e34552
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -390,10 +390,13 @@ class SnapListView(BaseView):
self.show_main_screen()
def offer_retry(self):
def try_again_pressed(unused) -> None:
self.wait_load()
self._w = screen(
[Text(_("Sorry, loading snaps from the store failed."))],
[
other_btn(label=_("Try again"), on_press=self.wait_load),
other_btn(label=_("Try again"), on_press=try_again_pressed),
ok_btn(label=_("Continue"), on_press=self.done),
])