INNER CODE UNIT · Dart

startsOnMessenger

rignaneseleo/SlimSocial-for-Facebook · SlimSocial_for_Facebook/lib/controllers/fb_controller.dart:28

  static bool startsOnMessenger() {
    if (!(sp.getBool(SpKeys.enableMessenger) ?? true)) return false;
    return sp.getBool(SpKeys.startOnMessenger) ?? false;
  }

  /// Returns the user agent to use for [role].
  ///
  /// Messenger is pinned to [kFirefoxUserAgent]. A custom string or the
  /// desktop-site / basic-mode switches would otherwise send it a mobile
  /// agent, and Facebook answers that with the native-app interstitial.
  ///
  /// For the feed: a custom agent wins, then basic mode, then the desktop-site
  /// setting, then the mobile default. A custom agent with nothing left after
  /// [sanitizeUserAgent] counts as unset.
  static String getUserAgent({UserAgentRole role = UserAgentRole.feed}) {
    if (role == UserAgentRole.messenger) return kFirefoxUserAgent;

    //sanitised on every read, not only on save: a value stored by an older

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…