Release 3.14.0

This commit is contained in:
Thomas 2023-01-07 17:47:57 +01:00
parent 4057a04302
commit 47e43193b8
7 changed files with 36 additions and 7 deletions

View File

@ -13,8 +13,8 @@ android {
defaultConfig {
minSdk 21
targetSdk 33
versionCode 461
versionName "3.13.7"
versionCode 462
versionName "3.14.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
flavorDimensions "default"

View File

@ -1,4 +1,9 @@
[
{
"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",

View File

@ -71,7 +71,12 @@ public interface MastodonNotificationsService {
@Field("data[alerts][favourite]") boolean favourite,
@Field("data[alerts][reblog]") boolean reblog,
@Field("data[alerts][mention]") boolean mention,
@Field("data[alerts][poll]") boolean poll
@Field("data[alerts][poll]") boolean poll,
@Field("data[alerts][status]") boolean status,
@Field("data[alerts][update]") boolean update,
@Field("data[alerts][admin.sign_up]") boolean admin_sign_up,
@Field("data[alerts][admin.report]") boolean admin_report
);
@GET("push/subscription")

View File

@ -90,8 +90,13 @@ public class NotificationsHelper {
boolean notif_share = prefs.getBoolean(context.getString(R.string.SET_NOTIF_SHARE), true);
boolean notif_poll = prefs.getBoolean(context.getString(R.string.SET_NOTIF_POLL), true);
boolean notif_fav = prefs.getBoolean(context.getString(R.string.SET_NOTIF_FAVOURITE), true);
boolean notif_status = prefs.getBoolean(context.getString(R.string.SET_NOTIF_STATUS), true);
boolean notif_updates = prefs.getBoolean(context.getString(R.string.SET_NOTIF_UPDATE), true);
boolean notif_signup = prefs.getBoolean(context.getString(R.string.SET_NOTIF_ADMIN_SIGNUP), true);
boolean notif_report = prefs.getBoolean(context.getString(R.string.SET_NOTIF_ADMIN_REPORT), true);
//User disagree with all notifications
if (!notif_follow && !notif_fav && !notif_mention && !notif_share && !notif_poll)
if (!notif_follow && !notif_fav && !notif_mention && !notif_share && !notif_poll && !notif_status && !notif_updates && !notif_signup && !notif_report)
return; //Nothing is done
MastodonNotificationsService mastodonNotificationsService = init(context, slugArray[1]);

View File

@ -64,6 +64,10 @@ public class PushNotifications {
boolean notif_share = prefs.getBoolean(context.getString(R.string.SET_NOTIF_SHARE), true);
boolean notif_poll = prefs.getBoolean(context.getString(R.string.SET_NOTIF_POLL), true);
boolean notif_fav = prefs.getBoolean(context.getString(R.string.SET_NOTIF_FAVOURITE), true);
boolean notif_status = prefs.getBoolean(context.getString(R.string.SET_NOTIF_STATUS), true);
boolean notif_updates = prefs.getBoolean(context.getString(R.string.SET_NOTIF_UPDATE), true);
boolean notif_signup = prefs.getBoolean(context.getString(R.string.SET_NOTIF_ADMIN_SIGNUP), true);
boolean notif_report = prefs.getBoolean(context.getString(R.string.SET_NOTIF_ADMIN_REPORT), true);
new Thread(() -> {
String[] slugArray = slug.split("@");
BaseAccount accountDb = null;
@ -87,7 +91,11 @@ public class PushNotifications {
notif_fav,
notif_share,
notif_mention,
notif_poll);
notif_poll,
notif_status,
notif_updates,
notif_signup,
notif_report);
if (pushSubscriptionCall != null) {
try {
Response<PushSubscription> pushSubscriptionResponse = pushSubscriptionCall.execute();

View File

@ -304,12 +304,17 @@ public class NotificationsVM extends AndroidViewModel {
boolean favourite,
boolean reblog,
boolean mention,
boolean poll) {
boolean poll,
boolean status,
boolean updates,
boolean signup,
boolean report
) {
pushSubscriptionMutableLiveData = new MutableLiveData<>();
MastodonNotificationsService mastodonNotificationsService = init(instance);
new Thread(() -> {
PushSubscription pushSubscription = null;
Call<PushSubscription> pushSubscriptionCall = mastodonNotificationsService.pushSubscription(token, endpoint, keys_p256dh, keys_auth, follow, favourite, reblog, mention, poll);
Call<PushSubscription> pushSubscriptionCall = mastodonNotificationsService.pushSubscription(token, endpoint, keys_p256dh, keys_auth, follow, favourite, reblog, mention, poll, status, updates, signup, report);
if (pushSubscriptionCall != null) {
try {
Response<PushSubscription> pushSubscriptionResponse = pushSubscriptionCall.execute();

View File

@ -14,6 +14,7 @@ Fixed:
- Links to messages not handled by the app
- CW when editing a message
- Fix push notifications with several accounts
- New messages or edition notifications not pushed
- Fix quotes with tags/mentions
- Fix notifications
- Fix sending multiple media