Nextbird / nextbird

“Life support” fork of Corebird, a native GTK+ Twitter client
GNU General Public License v3.0
11 stars 1 forks source link

Unable to send tweets #7

Open lucaswerkmeister opened 5 years ago

lucaswerkmeister commented 5 years ago

When running Corebird via Flatpak, I am unable to send tweets: the “send” button is disabled (“not sensitive” in GTK speak).

lucaswerkmeister commented 5 years ago

The reason for this seems to be that Corebird tries to detect whether a network connection is available or not:

  private void update_send_button_sensitivity () {
    Gtk.TextIter start, end;
    tweet_text.buffer.get_bounds (out start, out end);
    string text = tweet_text.buffer.get_text (start, end, true);

    int length = (int)Tl.count_characters (text);
    length_label.label = (Cb.Tweet.MAX_LENGTH - length).to_string ();

    if (length > 0 && length <= Cb.Tweet.MAX_LENGTH ||
        (length == 0 && compose_image_manager.n_images > 0)) {
      bool network_reachable = GLib.NetworkMonitor.get_default ().network_available;
      send_button.sensitive = network_reachable;
    } else {
      send_button.sensitive = false;
    }
  }

And I guess Flatpak blocks this check. I’m not sure whether it’s supposed to (the manifest declares --share=network, and the documentation I found seems to imply that this should allow NetworkMonitor access?), but for now I‘’ll just drop that check for simplicity.

lucaswerkmeister commented 5 years ago

Alternatively – using GNOME 3.30 instead of 3.26 also does the trick.