diff options
Diffstat (limited to 'app/src/main')
76 files changed, 2477 insertions, 1367 deletions
diff --git a/app/src/main/assets/release_notes/notes.json b/app/src/main/assets/release_notes/notes.json index 24c9070a8..c55a9703b 100644 --- a/app/src/main/assets/release_notes/notes.json +++ b/app/src/main/assets/release_notes/notes.json @@ -1,5 +1,30 @@ [ { + "version": "3.14.0", + "code": "462", + "note": "Added:\n\n- Add Bubble timeline support in extra-features with filters\n- Allow to display public profiles by default to get all messages (Settings > Interface)\n- Glitch: Allow to post messages locally (Can be turned off in Settings)\n- Pixelfed: Custom layout to display Media fully (Also works for other software when there are media)\n- Allow to align left action buttons in messages\n\nChanged:\n- Full rework on links in messages (also mentions and tags)\n- Add pinned tag in \"any\" to avoid to lose it when renaming timeline\n\nFixed:\n- Links to messages not handled by the app\n- CW when editing a message\n- Fix push notifications with several accounts\n- New messages or edition notifications not pushed\n- Fix quotes with tags/mentions\n- Fix notifications\n- Fix sending multiple media\n- Fix crashes" + }, + { + "version": "3.13.7", + "code": "461", + "note": "Added:\n- Pixelfed: Custom layout to display Media fully \n*(Settings > Timelines > Pixelfed Presentation) - Also works for other softwares when there are media\n\nChanged:\n- Add pinned tag in \"any\" to avoid to lose it when renaming timeline\n\nFixed:\n- Fix push notifications with several accounts\n- Fix quotes with tags/mentions\n- Fix notifications\n- Fix sending multiple media\n- Some crashes" + }, + { + "version": "3.13.6", + "code": "460", + "note": "Fixed:\n- Cross-compose: Wrong instance emojis\n- Custom emojis not displayed in notifications\n- Fav/Boost markers with shared messages\n- Empty notifications\n- Fix cw removed when replying\n- Fix expand media with fit preview images when sensitive\n- Fix an issue with fetch more displayed too often (cache clear will help or wait new messages)" + }, + { + "version": "3.13.5", + "code": "459", + "note": "Added:\n- Glitch: Allow to post messages locally (Can be turned off in Settings)\n\nFixed:\n- Crashes" + }, + { + "version": "3.13.4", + "code": "458", + "note": "Added:\n- Add Bubble timeline support in extra-features with filters\n- Allow to display public profiles by default to get all messages (Settings > Interface)\n\nChanged:\n- Full rework on links in messages (also mentions and tags)\n\nFixed:\n- Spoiler text when editing\n- Fix watermarks" + }, + { "version": "3.13.3", "code": "457", "note": "Added:\n- Allow to enable extra features in Settings\n- Customizable settings for extra features\n- Support quotes, reactions with messages\n- Support text format (html, markdown, etc.) when composing\n\nFixed:\n- CW not working with media\n- Media not displayed for older instances\n- Some crashes\n" diff --git a/app/src/main/java/app/fedilab/android/BaseMainActivity.java b/app/src/main/java/app/fedilab/android/BaseMainActivity.java index a09a6ec54..43b4ddb3b 100644 --- a/app/src/main/java/app/fedilab/android/BaseMainActivity.java +++ b/app/src/main/java/app/fedilab/android/BaseMainActivity.java @@ -165,6 +165,7 @@ import retrofit2.converter.gson.GsonConverterFactory; public abstract class BaseMainActivity extends BaseActivity implements NetworkStateReceiver.NetworkStateReceiverListener, FragmentMastodonTimeline.UpdateCounters, FragmentNotificationContainer.UpdateCounters, FragmentMastodonConversation.UpdateCounters { + private static final int REQUEST_CODE = 5415; public static String currentInstance, currentToken, currentUserID, client_id, client_secret, software; public static HashMap<String, List<Emoji>> emojis = new HashMap<>(); public static Account.API api; @@ -297,7 +298,6 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt }; private NetworkStateReceiver networkStateReceiver; private boolean headerMenuOpen; - private static final int REQUEST_CODE = 5415; @Override protected void onCreate(Bundle savedInstanceState) { @@ -683,6 +683,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt regex_local = sharedpreferences.getString(getString(R.string.SET_FILTER_REGEX_LOCAL) + currentUserID + currentInstance, null); regex_public = sharedpreferences.getString(getString(R.string.SET_FILTER_REGEX_PUBLIC) + currentUserID + currentInstance, null); show_art_nsfw = sharedpreferences.getBoolean(getString(R.string.SET_ART_WITH_NSFW) + currentUserID + currentInstance, false); + binding.profilePicture.setOnClickListener(v -> binding.drawerLayout.openDrawer(GravityCompat.START)); Helper.loadPP(BaseMainActivity.this, binding.profilePicture, currentAccount); headerMainBinding.accountAcc.setText(String.format("%s@%s", currentAccount.mastodon_account.username, currentAccount.instance)); @@ -785,7 +786,6 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt }); - binding.toolbarSearch.setOnSearchClickListener(v -> binding.tabLayout.setVisibility(View.VISIBLE)); //For receiving data from other activities LocalBroadcastManager.getInstance(BaseMainActivity.this).registerReceiver(broadcast_data, new IntentFilter(Helper.BROADCAST_DATA)); @@ -1041,7 +1041,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt String title = ""; String description = ""; - if(titleEl != null) { + if (titleEl != null) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { title = Html.fromHtml(titleEl.attr("content"), Html.FROM_HTML_MODE_LEGACY).toString(); } else { @@ -1049,7 +1049,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt } } - if(descriptionEl != null) { + if (descriptionEl != null) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { description = Html.fromHtml(descriptionEl.attr("content"), Html.FROM_HTML_MODE_LEGACY).toString(); } else { @@ -1058,13 +1058,13 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt } String imageUrl = ""; - if(imageUrlEl != null) { + if (imageUrlEl != null) { imageUrl = imageUrlEl.attr("content"); } StringBuilder titleBuilder = new StringBuilder(); - if(!originalUrl.trim().equalsIgnoreCase(sharedText.trim())) { + if (!originalUrl.trim().equalsIgnoreCase(sharedText.trim())) { // If the shared text is not just the URL, add it to the top String toAppend = sharedText.replaceAll("\\s*" + Pattern.quote(originalUrl) + "\\s*", ""); titleBuilder.append(toAppend); @@ -1072,7 +1072,8 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt if (title.length() > 0) { // OG title fetched from source - if(titleBuilder.length() > 0) titleBuilder.append("\n\n"); + if (titleBuilder.length() > 0) + titleBuilder.append("\n\n"); titleBuilder.append(title); } @@ -1138,7 +1139,6 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt b.putSerializable(Helper.ARG_MEDIA_ATTACHMENTS, new ArrayList<>(attachments)); CrossActionHelper.doCrossShare(BaseMainActivity.this, b); }); - CrossActionHelper.doCrossShare(BaseMainActivity.this, b); } else { Toasty.warning(BaseMainActivity.this, getString(R.string.toast_error), Toast.LENGTH_LONG).show(); } diff --git a/app/src/main/java/app/fedilab/android/activities/AccountReportActivity.java b/app/src/main/java/app/fedilab/android/activities/AccountReportActivity.java index 03fda1b7f..384a76980 100644 --- a/app/src/main/java/app/fedilab/android/activities/AccountReportActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/AccountReportActivity.java @@ -320,6 +320,7 @@ public class AccountReportActivity extends BaseBarActivity { } } + @Override public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == android.R.id.home) { diff --git a/app/src/main/java/app/fedilab/android/activities/ComposeActivity.java b/app/src/main/java/app/fedilab/android/activities/ComposeActivity.java index 5ff370bac..849b28a94 100644 --- a/app/src/main/java/app/fedilab/android/activities/ComposeActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/ComposeActivity.java @@ -107,11 +107,6 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana private Status statusReply, statusMention, statusQuoted; private StatusDraft statusDraft; private ComposeAdapter composeAdapter; - private boolean promptSaveDraft; - private boolean restoredDraft; - private List<Attachment> sharedAttachments; - - private final BroadcastReceiver imageReceiver = new BroadcastReceiver() { @Override public void onReceive(android.content.Context context, Intent intent) { @@ -138,7 +133,9 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana } } }; - + private boolean promptSaveDraft; + private boolean restoredDraft; + private List<Attachment> sharedAttachments; private ActivityPaginationBinding binding; private BaseAccount account; private String instance, token; @@ -537,10 +534,10 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana if (token == null) { token = account.token; } - if (emojis == null || !emojis.containsKey(currentInstance)) { + if (emojis == null || !emojis.containsKey(instance)) { new Thread(() -> { try { - emojis.put(currentInstance, new EmojiInstance(ComposeActivity.this).getEmojiList(currentInstance)); + emojis.put(instance, new EmojiInstance(ComposeActivity.this).getEmojiList(instance)); } catch (DBException e) { e.printStackTrace(); } @@ -637,6 +634,9 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana } if (statusReply.spoiler_text != null) { statusDraftList.get(0).spoiler_text = statusReply.spoiler_text; + if (statusReply.spoiler_text.trim().length() > 0) { + statusDraftList.get(0).spoilerChecked = true; + } } if (statusReply.language != null && !statusReply.language.isEmpty()) { statusDraftList.get(0).language = statusReply.language; diff --git a/app/src/main/java/app/fedilab/android/activities/HashTagActivity.java b/app/src/main/java/app/fedilab/android/activities/HashTagActivity.java index 7bf49af50..af6b0c533 100644 --- a/app/src/main/java/app/fedilab/android/activities/HashTagActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/HashTagActivity.java @@ -221,6 +221,8 @@ public class HashTagActivity extends BaseActivity { tagTimeline.name = stripTag.trim(); tagTimeline.isNSFW = false; tagTimeline.isART = false; + tagTimeline.any = new ArrayList<>(); + tagTimeline.any.add(stripTag.trim()); pinnedTimeline.tagTimeline = tagTimeline; pinned.pinnedTimelines.add(pinnedTimeline); if (update) { diff --git a/app/src/main/java/app/fedilab/android/activities/ProfileActivity.java b/app/src/main/java/app/fedilab/android/activities/ProfileActivity.java index 97b13d769..1ab57d6d8 100644 --- a/app/src/main/java/app/fedilab/android/activities/ProfileActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/ProfileActivity.java @@ -117,8 +117,6 @@ public class ProfileActivity extends BaseActivity { private String mention_str; private WellKnownNodeinfo.NodeInfo nodeInfo; private boolean checkRemotely; - private boolean homeMuted; - private final BroadcastReceiver broadcast_data = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { @@ -133,6 +131,7 @@ public class ProfileActivity extends BaseActivity { } } }; + private boolean homeMuted; @Override protected void onCreate(Bundle savedInstanceState) { @@ -145,6 +144,7 @@ public class ProfileActivity extends BaseActivity { Bundle b = getIntent().getExtras(); binding.accountFollow.setEnabled(false); checkRemotely = false; + SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(this); homeMuted = false; if (b != null) { account = (Account) b.getSerializable(Helper.ARG_ACCOUNT); @@ -152,6 +152,9 @@ public class ProfileActivity extends BaseActivity { mention_str = b.getString(Helper.ARG_MENTION, null); checkRemotely = b.getBoolean(Helper.ARG_CHECK_REMOTELY, false); } + if (!checkRemotely) { + checkRemotely = sharedpreferences.getBoolean(getString(R.string.SET_PROFILE_REMOTELY), false); + } ActivityCompat.postponeEnterTransition(ProfileActivity.this); //Remove title if (actionBar != null) { @@ -162,7 +165,7 @@ public class ProfileActivity extends BaseActivity { getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayShowHomeEnabled(true); } - |