fix: dont open view if already open

This commit is contained in:
Evangelos Paterakis 2022-11-15 00:38:44 +02:00
parent a4cc5a98cf
commit 96671a9217
No known key found for this signature in database
GPG Key ID: FE5185F095BFC8C9
1 changed files with 2 additions and 0 deletions

View File

@ -34,6 +34,8 @@ public class Tooth.Dialogs.MainWindow: Adw.ApplicationWindow, Saveable {
}
public Views.Base open_view (Views.Base view) {
if (last_view.label == view.label) return view;
leaflet.append (view);
leaflet.visible_child = view;
return view;