@@ -56,30 +56,10 @@ public class MainWindow : Adw.ApplicationWindow {
5656 ask_button.add_css_class ("suggested -action ");
5757 ask_button.add_css_class ("pill ");
5858
59- var banner = new Adw .Banner (_(" Unsupported version of this app" )) {
60- button_label = _ ("_Learn More …"),
61- revealed = true
62- };
63-
64- string [] env = Environ.get ();
65- try {
66- banner. revealed = (
67- Clairvoyant . settings. get_int64 (" last" ) < new DateTime .now_utc (). to_unix () - 86400 && (
68- ! Xdp . Portal . running_under_flatpak () ||
69- Xdp . Portal . running_under_snap () ||
70- Environ . get_variable (env, " FLATPAK_ID" ) != APP_ID ||
71- Environ . get_variable (env, " APPIMAGE" ) != null
72- )
73- );
74- } catch (Error e ) {
75- critical (" Unable to detect sandbox" );
76- }
77-
7859 var main_layout = new Gtk .Box (Gtk . Orientation . VERTICAL , 0 );
7960 main_layout.append (header );
8061 main_layout.append (fortune_label );
8162 main_layout.append (ask_button );
82- main_layout.append (banner );
8363
8464 var window_handle = new Gtk .WindowHandle () {
8565 child = main_layout
@@ -93,16 +73,6 @@ public class MainWindow : Adw.ApplicationWindow {
9373
9474 about_button.clicked.connect (() => about_window.present () );
9575 ask_button.clicked.connect (() => randomize_fortune (fortune_label ) );
96-
97- banner.button_clicked.connect (() => {
98- Clairvoyant . settings. set_int64 (" last" , new DateTime .now_utc (). to_unix ());
99- banner. revealed = false ;
100- try {
101- new Gtk .UriLauncher (about_window. website + " #only-on-flathub" ). launch. begin (null , null );
102- } catch (Error e) {
103- critical (" Unable to open link" );
104- }
105- });
10676 }
10777
10878 private void randomize_fortune (
0 commit comments