Commit 376daf7c authored by Thomas's avatar Thomas
Browse files

Merge branch 'develop'

parents 2a675da7 f858a870
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -13,8 +13,8 @@ android {
    defaultConfig {
        minSdk 21
        targetSdk 32
        versionCode 448
        versionName "3.11.2"
        versionCode 449
        versionName "3.11.3"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    flavorDimensions "default"
+5 −0
Original line number Diff line number Diff line
[
  {
    "version": "3.11.3",
    "code": "449",
    "note": "Added:\n- Add more targeted languages in picker for translations\n- Add account name in push notifications\n\nFixed:\n- Fix a crash when changing language\n- Fix counter colors\n- Fix default link color\n- Fix a crash when clicking on mentions"
  },
  {
    "version": "3.11.2",
    "code": "448",
+29 −11
Original line number Diff line number Diff line
@@ -322,7 +322,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
        binding.compose.setOnClickListener(v -> startActivity(new Intent(this, ComposeActivity.class)));
        headerMenuOpen = false;


        PushHelper.startStreaming(BaseMainActivity.this);

        // Passing each menu ID as a set of Ids because each
        // menu should be considered as top level destinations.
@@ -564,21 +564,15 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
        //Update account details
        new Thread(() -> {
            try {
                currentAccount = new Account(BaseMainActivity.this).getConnectedAccount();
                //Delete cache older than 7 days
                new StatusCache(BaseMainActivity.this).deleteForAllAccountAfter7Days();
                MutedAccounts mutedAccounts = new MutedAccounts(BaseMainActivity.this).getMutedAccount(currentAccount);
                if (mutedAccounts != null && mutedAccounts.accounts != null) {
                    filteredAccounts = mutedAccounts.accounts;
                if (currentToken == null) {
                    currentToken = sharedpreferences.getString(Helper.PREF_USER_TOKEN, null);
                }
                currentAccount = new Account(BaseMainActivity.this).getConnectedAccount();
            } catch (DBException e) {
                e.printStackTrace();
            }
            Handler mainHandler = new Handler(Looper.getMainLooper());
            Runnable myRunnable = () -> {
                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);
@@ -747,7 +741,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
            return false;
        });

        PushHelper.startStreaming(BaseMainActivity.this);


        binding.toolbarSearch.setOnSearchClickListener(v -> binding.tabLayout.setVisibility(View.VISIBLE));
        //For receiving  data from other activities
@@ -764,6 +758,30 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
                }
            }).start();
        }
        //Fetch some db values to initialize data
        new Thread(() -> {
            try {
                if (currentAccount == null) {
                    if (currentToken == null || currentToken.trim().isEmpty()) {
                        currentToken = sharedpreferences.getString(Helper.PREF_USER_TOKEN, null);
                    }
                    try {
                        currentAccount = new Account(BaseMainActivity.this).getConnectedAccount();
                    } catch (DBException e) {
                        e.printStackTrace();
                    }
                }
                MutedAccounts mutedAccounts = new MutedAccounts(BaseMainActivity.this).getMutedAccount(currentAccount);
                if (mutedAccounts != null && mutedAccounts.accounts != null) {
                    filteredAccounts = mutedAccounts.accounts;
                }
                //Delete cache older than 7 days
                new StatusCache(BaseMainActivity.this).deleteForAllAccountAfter7Days();
            } catch (DBException e) {
                e.printStackTrace();
            }
        }).start();

        //Fetch recent used accounts
        new Thread(() -> {
            try {
+0 −2
Original line number Diff line number Diff line
@@ -103,8 +103,6 @@ public class Status implements Serializable, Cloneable {
    public boolean isTruncated = true;
    public boolean isFetchMore = false;
    public PositionFetchMore positionFetchMore = PositionFetchMore.BOTTOM;
    public boolean isMediaDisplayed = false;
    public boolean isMediaObfuscated = true;
    public boolean isChecked = false;
    public String translationContent;
    public boolean translationShown;
+1 −1
Original line number Diff line number Diff line
@@ -197,7 +197,7 @@ public class MutedAccounts implements Serializable {
        MutedAccounts mutedAccounts = getMutedAccount(forAccount);
        if (mutedAccounts != null && mutedAccounts.accounts != null) {
            for (Account account : mutedAccounts.accounts) {
                if (account.id.equals(target.id)) {
                if (account != null && target != null && account.id.equals(target.id)) {
                    return true;
                }
            }
Loading