INNER CODE UNIT · Dart

setTextZoom

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

  static Future<void> setTextZoom(int textZoom) =>
      sp.setInt(SpKeys.textZoom, _clampTextZoom(textZoom));

  /// How many feed items the filter has hidden, across every session.
  static int getAdsBlockedTotal() => sp.getInt(SpKeys.adsBlockedTotal) ?? 0;

  /// Adds [count] to the running total and returns the new value.
  ///
  /// Negative and zero counts are ignored: the page is the source of this
  /// number and nothing there should be able to walk the total backwards.
  static Future<int> addAdsBlocked(int count) async {
    if (count <= 0) return getAdsBlockedTotal();

    final total = getAdsBlockedTotal() + count;
    await sp.setInt(SpKeys.adsBlockedTotal, total);
    return total;
  }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…