Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 58862de6 authored by calderwoodra's avatar calderwoodra Committed by Copybara-Service
Browse files

Preload call log fragment on app start.

Default is set to true but if we see issues with startup latency we can disable
this server side.

Test: n/a
PiperOrigin-RevId: 187419851
Change-Id: I6d1debfed86dbcaf3ee73ec0906e514a2687e2c0
parent a109ed80
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -1077,6 +1077,18 @@ public class OldMainActivityPeer implements MainActivityPeer, FragmentUtilListen
      this.context = context;
      this.fragmentManager = fragmentManager;
      this.fab = fab;
      preloadCallLogFragment();
    }

    private void preloadCallLogFragment() {
      if (ConfigProviderBindings.get(context).getBoolean("nui_preload_call_log", true)) {
        CallLogFragment fragment = new CallLogFragment();
        fragmentManager
            .beginTransaction()
            .add(R.id.fragment_container, fragment, CALL_LOG_TAG)
            .hide(fragment)
            .commit();
      }
    }

    @Override