Skip to content

Commit

Permalink
internal/ui: remove Mullvad node list when offline (#114)
Browse files Browse the repository at this point in the history
* Update dev.deedles.Trayscale.metainfo.xml

* internal/ui: remove Mullvad page when offline

* meta: add a screenshot of the offline UI to the metainfo

* meta: add bug fix to metainfo changelist
  • Loading branch information
DeedleFake authored May 3, 2024
1 parent d11c450 commit 1764ca5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
7 changes: 7 additions & 0 deletions dev.deedles.Trayscale.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<screenshots>
<screenshot type="default">
<image>https://github.com/DeedleFake/trayscale/assets/326750/156e5138-ce60-4940-8cdc-67afa27fcf6f</image>
<image>https://github.com/DeedleFake/trayscale/assets/326750/2d06e023-9c24-4d72-9e28-c62f6fb53832</image>
</screenshot>
</screenshots>

Expand All @@ -46,6 +47,12 @@
<content_rating type="oars-1.1" />

<releases>
<release version="v0.12.1" date="2024-05-02">
<description>
<ul>Strip debugging symbols to reduce binary size.</ul>
<ul>Remove Mullvad page when switching to offline.</ul>
</description>
</release>
<release version="v0.12.0" date="2024-05-02">
<description>
<ul>Move all Mullvad nodes into their own page.</ul>
Expand Down
7 changes: 6 additions & 1 deletion internal/ui/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,16 @@ func (a *App) updatePeersOffline() {
}
clear(a.peerPages)

if (a.selfPage != nil) && (stack.Page(a.selfPage.page.Root()).Object != nil) {
if a.selfPage != nil {
stack.Remove(a.selfPage.page.Root())
a.selfPage = nil
}

if a.mullvadPage != nil {
stack.Remove(a.mullvadPage.page.Root())
a.mullvadPage = nil
}

if stack.Page(a.statusPage).Object == nil {
stack.AddTitled(a.statusPage, "status", "Not Connected")
}
Expand Down

0 comments on commit 1764ca5

Please sign in to comment.