Commit 72fd064f authored by Thomas's avatar Thomas
Browse files

Some fixes

parent 365179de
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@

        <activity
            android:name=".activities.MainActivity"
            android:launchMode="singleTask"
            android:configChanges="orientation|screenSize|keyboardHidden|screenLayout|smallestScreenSize"
            android:exported="true">
            <intent-filter>
+4 −4
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana
                for (Status status : statusList) {
                    if (status.media_attachments != null && status.media_attachments.size() > 0) {
                        for (Attachment attachment : status.media_attachments) {
                            if (attachment.local_path.equalsIgnoreCase(imgpath)) {
                            if (attachment.local_path != null && attachment.local_path.equalsIgnoreCase(imgpath)) {
                                if (focusX != -2) {
                                    attachment.focus = focusX + "," + focusY;
                                }
@@ -492,7 +492,7 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana
            visibility = b.getString(Helper.ARG_VISIBILITY, null);
            if (visibility == null && statusReply != null) {
                visibility = getVisibility(statusReply.visibility);
            } else if (visibility == null && currentAccount != null && currentAccount.mastodon_account.source != null) {
            } else if (visibility == null && currentAccount != null && currentAccount.mastodon_account != null && currentAccount.mastodon_account.source != null) {
                visibility = currentAccount.mastodon_account.source.privacy;
            }
            mentionBooster = (app.fedilab.android.client.entities.api.Account) b.getSerializable(Helper.ARG_MENTION_BOOSTER);
@@ -615,7 +615,7 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana
            //We change order for mentions
            //At first place the account that has been mentioned if it's not our
            statusDraftList.get(0).mentions = new ArrayList<>();
            if (statusReply.account.acct != null && !statusReply.account.acct.equalsIgnoreCase(currentAccount.mastodon_account.acct)) {
            if (statusReply.account.acct != null && currentAccount.mastodon_account != null && !statusReply.account.acct.equalsIgnoreCase(currentAccount.mastodon_account.acct)) {
                Mention mention = new Mention();
                mention.acct = "@" + statusReply.account.acct;
                mention.url = statusReply.account.url;
@@ -626,7 +626,7 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana
            //There are other mentions to
            if (statusReply.mentions != null && statusReply.mentions.size() > 0) {
                for (Mention mentionTmp : statusReply.mentions) {
                    if (statusReply.account.acct != null && !mentionTmp.acct.equalsIgnoreCase(statusReply.account.acct) && !mentionTmp.acct.equalsIgnoreCase(currentAccount.mastodon_account.acct)) {
                    if (statusReply.account.acct != null && !mentionTmp.acct.equalsIgnoreCase(statusReply.account.acct) && currentAccount.mastodon_account != null && !mentionTmp.acct.equalsIgnoreCase(currentAccount.mastodon_account.acct)) {
                        statusDraftList.get(0).mentions.add(mentionTmp);
                    }
                }
+1 −1
Original line number Diff line number Diff line
@@ -277,7 +277,7 @@ public class MastodonListActivity extends BaseActivity implements MastodonListAd
                                if (mastodonListList == null) {
                                    mastodonListList = new ArrayList<>();
                                }
                                if (newMastodonList != null) {
                                if (newMastodonList != null && mastodonListAdapter != null) {
                                    mastodonListList.add(0, newMastodonList);
                                    mastodonListAdapter.notifyItemInserted(0);
                                } else {
+5 −2
Original line number Diff line number Diff line
@@ -663,7 +663,10 @@ public class ProfileActivity extends BaseActivity {
    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        int itemId = item.getItemId();
        String[] splitAcct = account.acct.split("@");
        String[] splitAcct = null;
        if (account.acct != null) {
            splitAcct = account.acct.split("@");
        }
        SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(ProfileActivity.this);
        AlertDialog.Builder builderInner = null;
        final boolean isOwner = account.id != null && BaseMainActivity.currentUserID != null && account.id.compareToIgnoreCase(BaseMainActivity.currentUserID) == 0;
@@ -677,7 +680,7 @@ public class ProfileActivity extends BaseActivity {
        if (itemId == android.R.id.home) {
            finish();
            return true;
        } else if (itemId == R.id.action_follow_instance) {
        } else if (itemId == R.id.action_follow_instance && splitAcct != null) {
            String finalInstanceName = splitAcct[1];
            ReorderVM reorderVM = new ViewModelProvider(ProfileActivity.this).get(ReorderVM.class);
            //Get pinned instances
+6 −1
Original line number Diff line number Diff line
@@ -59,7 +59,12 @@ public class DomainsBlock {
                    List<String> domains = new ArrayList<>();
                    while ((line = br.readLine()) != null) {
                        if (line.startsWith("0.0.0.0 ")) {
                            try {
                                domains.add(line.replace("0.0.0.0 ", "").trim());
                            } catch (Exception e) {
                                return;
                            }

                        }
                    }
                    br.close();
Loading