Commit 7ada093a authored by Thomas's avatar Thomas
Browse files

Merge branch 'develop'

parents 27f1d594 29a5678a
Loading
Loading
Loading
Loading
+15 −18
Original line number Diff line number Diff line
@@ -8,13 +8,13 @@ plugins {
}
def flavor
android {
    compileSdk 31
    compileSdk 32

    defaultConfig {
        minSdk 21
        targetSdk 31
        versionCode 433
        versionName "3.8.0"
        targetSdk 32
        versionCode 437
        versionName "3.9.2"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    flavorDimensions "default"
@@ -78,8 +78,8 @@ allprojects {
}
dependencies {
    implementation project(':autoimageslider')
    implementation 'androidx.appcompat:appcompat:1.4.2'
    implementation 'com.google.android.material:material:1.6.1'
    implementation 'androidx.appcompat:appcompat:1.5.1'
    implementation 'com.google.android.material:material:1.7.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation "com.google.code.gson:gson:2.9.1"
    implementation 'com.squareup.retrofit2:retrofit:2.9.0'
@@ -88,12 +88,11 @@ dependencies {
    implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
    implementation 'androidx.preference:preference:1.2.0'
    implementation "org.conscrypt:conscrypt-android:2.5.2"
    implementation 'com.github.evozi:Cyanea:1.0.7'
    implementation 'com.vanniktech:emoji-one:0.6.0'
    implementation 'com.github.GrenderG:Toasty:1.5.2'
    implementation 'org.framagit.tom79:SparkButton:1.0.13'
    implementation "com.github.bumptech.glide:glide:4.12.0"
    implementation "com.github.bumptech.glide:okhttp3-integration:4.12.0"
    implementation "com.github.bumptech.glide:glide:4.14.2"
    implementation "com.github.bumptech.glide:okhttp3-integration:4.14.2"

    implementation "org.jsoup:jsoup:1.15.1"

@@ -102,12 +101,11 @@ dependencies {
    implementation project(path: ':ratethisapp')



    implementation 'com.burhanrashid52:photoeditor:1.5.1'
    implementation project(path: ':cropper')
    annotationProcessor "com.github.bumptech.glide:compiler:4.12.0"
    implementation 'jp.wasabeef:glide-transformations:4.3.0'
    implementation 'com.github.penfeizhou.android.animation:glide-plugin:2.22.0'
    implementation 'com.github.penfeizhou.android.animation:glide-plugin:2.24.0'
    implementation 'com.google.android.exoplayer:exoplayer:2.18.1'
    implementation "androidx.viewpager2:viewpager2:1.0.0"
    implementation 'com.github.piasy:rxandroidaudio:1.7.0'
@@ -118,7 +116,6 @@ dependencies {
    implementation "ch.acra:acra-mail:5.9.6"
    implementation "ch.acra:acra-limiter:5.9.3"
    implementation "ch.acra:acra-dialog:5.9.6"

    implementation "com.madgag.spongycastle:bctls-jdk15on:1.58.0.0"
    implementation 'com.github.UnifiedPush:android-connector:2.0.1'
   // implementation 'com.github.UnifiedPush:android-foss_embedded_fcm_distributor:1.0.0-beta1'
@@ -132,11 +129,11 @@ dependencies {
    implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
    implementation 'androidx.lifecycle:lifecycle-livedata:2.5.1'
    implementation 'androidx.lifecycle:lifecycle-viewmodel:2.5.1'
    implementation 'androidx.navigation:navigation-fragment:2.5.1'
    implementation 'androidx.navigation:navigation-ui:2.5.1'
    implementation 'androidx.navigation:navigation-fragment:2.5.3'
    implementation 'androidx.navigation:navigation-ui:2.5.3'
    testImplementation 'junit:junit:'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
    androidTestImplementation 'androidx.test.ext:junit:1.1.4'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
    // debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.8.1'

    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
+12 −17
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@
        android:roundIcon="@mipmap/ic_launcher_bubbles_round"
        android:supportsRtl="true"
        android:requestLegacyExternalStorage="true"
        android:theme="@style/AppThemeDark"
        android:theme="@style/AppTheme"
        android:usesCleartextTraffic="true"
        tools:replace="android:allowBackup">

@@ -166,9 +166,6 @@
                    android:scheme="fedilab" />
            </intent-filter>
        </activity>
        <activity
            android:name=".activities.WebviewConnectActivity"
            android:configChanges="keyboardHidden|orientation|screenSize" />
        <activity
            android:name=".activities.StatusHistoryActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
@@ -193,9 +190,6 @@
        <activity
            android:name=".activities.FollowRequestActivity"
            android:configChanges="keyboardHidden|orientation|screenSize" />
        <activity
            android:name=".activities.WebviewActivity"
            android:configChanges="keyboardHidden|orientation|screenSize" />
        <activity
            android:name=".activities.ProfileActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
@@ -243,6 +237,7 @@
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:label="@string/action_about"
            android:theme="@style/AppThemeBar" />

        <activity
            android:name=".activities.admin.AdminDomainBlockActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
@@ -287,15 +282,15 @@
            android:name=".activities.InstanceActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:label="@string/action_about_instance"
            android:theme="@style/DialogDark" />
            android:theme="@style/AppThemeAlertDialog" />
        <activity
            android:name=".activities.InstanceProfileActivity"
            android:excludeFromRecents="true"
            android:theme="@style/DialogDark" />
            android:theme="@style/AppThemeAlertDialog" />
        <activity
            android:name=".activities.ProxyActivity"
            android:excludeFromRecents="true"
            android:theme="@style/DialogDark" />
            android:theme="@style/AppThemeAlertDialog" />
        <activity
            android:name=".activities.HashTagActivity"
            android:configChanges="keyboardHidden|orientation|screenSize" />
@@ -305,38 +300,38 @@
        <activity
            android:name=".activities.MediaActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@style/TransparentDark" />
            android:theme="@style/Transparent" />

        <activity
            android:name=".activities.InstanceHealthActivity"
            android:excludeFromRecents="true"
            android:theme="@style/DialogDark" />
            android:theme="@style/AppThemeAlertDialog" />

        <activity
            android:name=".activities.ReportActivity"
            android:theme="@style/AppThemeBarDark"
            android:theme="@style/AppThemeBar"
            android:windowSoftInputMode="stateVisible" />

        <activity
            android:name=".activities.CustomSharingActivity"
            android:label="@string/settings_title_custom_sharing"
            android:theme="@style/AppThemeBarDark"
            android:theme="@style/AppThemeBar"
            android:windowSoftInputMode="stateVisible" />
        <activity
            android:name=".activities.FilterActivity"
            android:label="@string/filters"
            android:theme="@style/AppThemeBarDark"
            android:theme="@style/AppThemeBar"
            android:windowSoftInputMode="stateVisible" />
        <activity
            android:name=".activities.EditProfileActivity"
            android:label="@string/edit_profile"
            android:theme="@style/AppThemeBarDark"
            android:theme="@style/AppThemeBar"
            android:windowSoftInputMode="stateVisible" />

        <activity
            android:name=".activities.CacheActivity"
            android:label="@string/action_cache"
            android:theme="@style/AppThemeBarDark" />
            android:theme="@style/AppThemeBar" />

        <provider
            android:name="androidx.core.content.FileProvider"
+20 −0
Original line number Diff line number Diff line
[
  {
    "version": "3.9.2",
    "code": "437",
    "note": "Added:\n- New design with 5 themes\n\nChanged:\n- Remove built-in browser support\n- Fit preview image displays images vertically\n- Add counters next to images\n\nFixed:\n- Jumps in timelines\n- Replies to wrong messages with followed instances\n- Bug with delete&redraft with a media\n- List cannot be hidden\n- Some crashes"
  },
  {
    "version": "3.9.1",
    "code": "436",
    "note": "Changed:\n- Remove built-in browser support\n- More spaces between action buttons in messages\n\nFixed:\n- Text size issue\n- Text overlap\n- Wrong background for solarized black\n- Mix between light and dark theme\n- Save button hidden"
  },
  {
    "version": "3.9.0",
    "code": "435",
    "note": "Added:\n- Migrate to Material Design 3\n- 5 Themes (Light, Dark, Solarized Light/Dark, Black)\n- Automatically switch between Light/Dark\n- Light and Dark theme can be defined for time-based switch\n- Android 12+: Dynamic color\n\nFixed:\n- Jumps in timelines\n"
  },
  {
    "version": "3.8.1",
    "code": "434",
    "note": "Added:\n- Mute tags with long press in timelines\n\nChanged:\n- Muted account messages are now removed from cache\n\nFixed:\n- Open with another account\n- Fix jumps in profiles\n- Media not displayed in album -> force indexation\n- Built-in browser does not give admin scope\n- Some crashes"
  },
  {
    "version": "3.8.0",
    "code": "433",
+20 −44
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.graphics.PorterDuff;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Build;
@@ -39,7 +38,7 @@ import android.text.Editable;
import android.text.Html;
import android.text.TextWatcher;
import android.util.Patterns;
import android.view.ContextThemeWrapper;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.Menu;
@@ -59,7 +58,6 @@ import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.PopupMenu;
import androidx.appcompat.widget.SearchView;
import androidx.core.app.ActivityOptionsCompat;
import androidx.core.content.ContextCompat;
import androidx.core.view.GravityCompat;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentTransaction;
@@ -77,7 +75,6 @@ import com.bumptech.glide.request.target.CustomTarget;
import com.bumptech.glide.request.transition.Transition;
import com.google.android.material.snackbar.Snackbar;
import com.google.android.material.tabs.TabLayout;
import com.jaredrummler.cyanea.Cyanea;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
@@ -85,6 +82,7 @@ import org.jsoup.nodes.Element;

import java.io.File;
import java.io.IOException;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -129,7 +127,6 @@ import app.fedilab.android.client.entities.api.Status;
import app.fedilab.android.client.entities.app.Account;
import app.fedilab.android.client.entities.app.BaseAccount;
import app.fedilab.android.client.entities.app.BottomMenu;
import app.fedilab.android.client.entities.app.DomainsBlock;
import app.fedilab.android.client.entities.app.Pinned;
import app.fedilab.android.client.entities.app.PinnedTimeline;
import app.fedilab.android.client.entities.app.StatusCache;
@@ -143,7 +140,6 @@ import app.fedilab.android.helper.Helper;
import app.fedilab.android.helper.MastodonHelper;
import app.fedilab.android.helper.PinnedTimelineHelper;
import app.fedilab.android.helper.PushHelper;
import app.fedilab.android.helper.ThemeHelper;
import app.fedilab.android.ui.fragment.timeline.FragmentMastodonConversation;
import app.fedilab.android.ui.fragment.timeline.FragmentMastodonTimeline;
import app.fedilab.android.ui.fragment.timeline.FragmentNotificationContainer;
@@ -195,9 +191,6 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
                                intentCompose.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                                context.startActivity(intentCompose);
                            })
                            .setTextColor(ThemeHelper.getAttColor(BaseMainActivity.this, R.attr.mTextColor))
                            .setActionTextColor(ContextCompat.getColor(BaseMainActivity.this, R.color.cyanea_accent_reference))
                            .setBackgroundTint(ContextCompat.getColor(BaseMainActivity.this, R.color.cyanea_primary_dark_reference))
                            .show();
                }
            }
@@ -259,7 +252,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
                        });
                    }
                } else if (b.getBoolean(Helper.RECEIVE_RECREATE_ACTIVITY, false)) {
                    Cyanea.getInstance().edit().apply().recreate(BaseMainActivity.this);
                    recreate();
                } else if (b.getBoolean(Helper.RECEIVE_NEW_MESSAGE, false)) {
                    Status statusSent = (Status) b.getSerializable(Helper.RECEIVE_STATUS_ACTION);
                    String statusEditId = b.getString(Helper.ARG_EDIT_STATUS_ID, null);
@@ -270,9 +263,6 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
                                intentContext.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                                startActivity(intentContext);
                            })
                            .setTextColor(ThemeHelper.getAttColor(BaseMainActivity.this, R.attr.mTextColor))
                            .setActionTextColor(ContextCompat.getColor(BaseMainActivity.this, R.color.cyanea_accent_reference))
                            .setBackgroundTint(ContextCompat.getColor(BaseMainActivity.this, R.color.cyanea_primary_dark_reference))
                            .show();
                    //The message was edited, we need to update the timeline
                    if (statusEditId != null) {
@@ -303,7 +293,6 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(BaseMainActivity.this);
        ThemeHelper.applyTheme(this);
        if (!Helper.isLoggedIn(BaseMainActivity.this)) {
            //It is not, the user is redirected to the login page
            Intent myIntent = new Intent(BaseMainActivity.this, LoginActivity.class);
@@ -314,9 +303,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
            BaseMainActivity.currentToken = sharedpreferences.getString(Helper.PREF_USER_TOKEN, null);
        }


        mamageNewIntent(getIntent());
        ThemeHelper.initiliazeColors(BaseMainActivity.this);
        filterFetched = false;
        networkStateReceiver = new NetworkStateReceiver();
        networkStateReceiver.addListener(this);
@@ -329,13 +316,10 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
            actionBar.setDisplayShowTitleEnabled(false);
        }
        rateThisApp();
        SharedPreferences cyneaPref = getSharedPreferences("com.jaredrummler.cyanea", Context.MODE_PRIVATE);
        binding.tabLayout.setTabTextColors(ThemeHelper.getAttColor(BaseMainActivity.this, R.attr.mTextColor), cyneaPref.getInt("theme_accent", -1));
        binding.tabLayout.setTabIconTint(ThemeHelper.getColorStateList(BaseMainActivity.this));

        binding.compose.setOnClickListener(v -> startActivity(new Intent(this, ComposeActivity.class)));
        headerMenuOpen = false;
        binding.bottomNavView.setBackgroundDrawable(new ColorDrawable(ContextCompat.getColor(this, R.color.cyanea_primary)));
        binding.navView.setBackgroundDrawable(new ColorDrawable(ContextCompat.getColor(this, R.color.cyanea_primary)));



        // Passing each menu ID as a set of Ids because each
@@ -537,7 +521,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
        });

        headerMainBinding.headerOptionInfo.setOnClickListener(v -> {
            PopupMenu popup = new PopupMenu(new ContextThemeWrapper(BaseMainActivity.this, Helper.popupStyle()), headerMainBinding.headerOptionInfo);
            PopupMenu popup = new PopupMenu(BaseMainActivity.this, headerMainBinding.headerOptionInfo);
            popup.getMenuInflater()
                    .inflate(R.menu.main, popup.getMenu());

@@ -586,7 +570,10 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
            }
            Handler mainHandler = new Handler(Looper.getMainLooper());
            Runnable myRunnable = () -> {
                if (currentAccount == null || currentAccount.mastodon_account == null) {
                if (currentToken == null) {
                    currentToken = sharedpreferences.getString(Helper.PREF_USER_TOKEN, null);
                }
                if (currentAccount == null) {
                    //It is not, the user is redirected to the login page
                    Intent myIntent = new Intent(BaseMainActivity.this, LoginActivity.class);
                    startActivity(myIntent);
@@ -659,9 +646,16 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
                if (currentAccount.mastodon_account.display_name == null || currentAccount.mastodon_account.display_name.isEmpty()) {
                    currentAccount.mastodon_account.display_name = currentAccount.mastodon_account.acct;
                }
                headerMainBinding.accountName.setText(currentAccount.mastodon_account.display_name);
                headerMainBinding.accountName.setText(
                        currentAccount.mastodon_account.getSpanDisplayName(BaseMainActivity.this,
                                new WeakReference<>(headerMainBinding.accountName)),
                        TextView.BufferType.SPANNABLE);
                float scale = sharedpreferences.getFloat(getString(R.string.SET_FONT_SCALE), 1.1f);
                headerMainBinding.accountName.setTextSize(TypedValue.COMPLEX_UNIT_SP, 18 * 1.1f / scale);
                headerMainBinding.accountAcc.setTextSize(TypedValue.COMPLEX_UNIT_SP, 18 * 1.1f / scale);
                Helper.loadPP(BaseMainActivity.this, headerMainBinding.accountProfilePicture, currentAccount, false);
                MastodonHelper.loadProfileMediaMastodon(headerMainBinding.backgroundImage, currentAccount.mastodon_account, MastodonHelper.MediaAccountType.HEADER);
                MastodonHelper.loadProfileMediaMastodon(BaseMainActivity.this, headerMainBinding.backgroundImage, currentAccount.mastodon_account, MastodonHelper.MediaAccountType.HEADER);
                headerMainBinding.backgroundImage.setAlpha(0.5f);
                /*
                 * Some general data are loaded when the app starts such;
                 *  - Pinned timelines (in app feature)
@@ -762,10 +756,6 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
                }
            }).start();
        }
        boolean embedded_browser = sharedpreferences.getBoolean(getString(R.string.SET_EMBEDDED_BROWSER), true);
        if (embedded_browser) {
            DomainsBlock.updateDomains(BaseMainActivity.this);
        }
    }

    protected abstract void rateThisApp();
@@ -1120,7 +1110,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
            view = binding.bottomNavView.findViewById(R.id.nav_public);
            showExtendedFilter = false;
        }
        PopupMenu popup = new PopupMenu(new ContextThemeWrapper(BaseMainActivity.this, Helper.popupStyle()), view, Gravity.TOP);
        PopupMenu popup = new PopupMenu(BaseMainActivity.this, view, Gravity.TOP);
        popup.getMenuInflater()
                .inflate(R.menu.option_filter_toots, popup.getMenu());
        Menu menu = popup.getMenu();
@@ -1266,8 +1256,6 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
        if (!singleBar) {
            if (count > 0) {
                binding.bottomNavView.getOrCreateBadge(R.id.nav_privates).setNumber(count);
                binding.bottomNavView.getBadge(R.id.nav_privates).setBackgroundColor(ContextCompat.getColor(BaseMainActivity.this, R.color.cyanea_accent_reference));
                binding.bottomNavView.getBadge(R.id.nav_privates).setBadgeTextColor(ThemeHelper.getAttColor(BaseMainActivity.this, R.attr.mTextColor));
            } else {
                binding.bottomNavView.removeBadge(R.id.nav_privates);
            }
@@ -1286,8 +1274,6 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
        if (!singleBar) {
            if (count > 0) {
                binding.bottomNavView.getOrCreateBadge(R.id.nav_notifications).setNumber(count);
                binding.bottomNavView.getBadge(R.id.nav_notifications).setBackgroundColor(ContextCompat.getColor(BaseMainActivity.this, R.color.cyanea_accent_reference));
                binding.bottomNavView.getBadge(R.id.nav_notifications).setBadgeTextColor(ThemeHelper.getAttColor(BaseMainActivity.this, R.attr.mTextColor));
            } else {
                binding.bottomNavView.removeBadge(R.id.nav_notifications);
            }
@@ -1352,8 +1338,6 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
                case HOME:
                    if (count > 0) {
                        binding.bottomNavView.getOrCreateBadge(R.id.nav_home).setNumber(count);
                        binding.bottomNavView.getBadge(R.id.nav_home).setBackgroundColor(ContextCompat.getColor(BaseMainActivity.this, R.color.cyanea_accent_reference));
                        binding.bottomNavView.getBadge(R.id.nav_home).setBadgeTextColor(ThemeHelper.getAttColor(BaseMainActivity.this, R.attr.mTextColor));
                    } else {
                        binding.bottomNavView.removeBadge(R.id.nav_home);
                    }
@@ -1361,8 +1345,6 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
                case LOCAL:
                    if (count > 0) {
                        binding.bottomNavView.getOrCreateBadge(R.id.nav_local).setNumber(count);
                        binding.bottomNavView.getBadge(R.id.nav_local).setBackgroundColor(ContextCompat.getColor(BaseMainActivity.this, R.color.cyanea_accent_reference));
                        binding.bottomNavView.getBadge(R.id.nav_local).setBadgeTextColor(ThemeHelper.getAttColor(BaseMainActivity.this, R.attr.mTextColor));
                    } else {
                        binding.bottomNavView.removeBadge(R.id.nav_local);
                    }
@@ -1370,8 +1352,6 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
                case PUBLIC:
                    if (count > 0) {
                        binding.bottomNavView.getOrCreateBadge(R.id.nav_public).setNumber(count);
                        binding.bottomNavView.getBadge(R.id.nav_public).setBackgroundColor(ContextCompat.getColor(BaseMainActivity.this, R.color.cyanea_accent_reference));
                        binding.bottomNavView.getBadge(R.id.nav_public).setBadgeTextColor(ThemeHelper.getAttColor(BaseMainActivity.this, R.attr.mTextColor));
                    } else {
                        binding.bottomNavView.removeBadge(R.id.nav_public);
                    }
@@ -1379,8 +1359,6 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
                case NOTIFICATION:
                    if (count > 0) {
                        binding.bottomNavView.getOrCreateBadge(R.id.nav_notifications).setNumber(count);
                        binding.bottomNavView.getBadge(R.id.nav_notifications).setBackgroundColor(ContextCompat.getColor(BaseMainActivity.this, R.color.cyanea_accent_reference));
                        binding.bottomNavView.getBadge(R.id.nav_notifications).setBadgeTextColor(ThemeHelper.getAttColor(BaseMainActivity.this, R.attr.mTextColor));
                    } else {
                        binding.bottomNavView.removeBadge(R.id.nav_notifications);
                    }
@@ -1388,8 +1366,6 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
                case DIRECT:
                    if (count > 0) {
                        binding.bottomNavView.getOrCreateBadge(R.id.nav_privates).setNumber(count);
                        binding.bottomNavView.getBadge(R.id.nav_privates).setBackgroundColor(ContextCompat.getColor(BaseMainActivity.this, R.color.cyanea_accent_reference));
                        binding.bottomNavView.getBadge(R.id.nav_privates).setBadgeTextColor(ThemeHelper.getAttColor(BaseMainActivity.this, R.attr.mTextColor));
                    } else {
                        binding.bottomNavView.removeBadge(R.id.nav_privates);
                    }
+8 −16

File changed.

Preview size limit exceeded, changes collapsed.

Loading