small update
This commit is contained in:
parent
f382081a5d
commit
f5486a3232
|
@ -9,8 +9,8 @@ android {
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk 21
|
minSdk 21
|
||||||
targetSdk 31
|
targetSdk 31
|
||||||
versionCode 393
|
versionCode 394
|
||||||
versionName "3.0.2"
|
versionName "3.0.3"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
flavorDimensions "default"
|
flavorDimensions "default"
|
||||||
|
|
|
@ -27,6 +27,9 @@ import androidx.lifecycle.ViewModelProvider;
|
||||||
import androidx.lifecycle.ViewModelStoreOwner;
|
import androidx.lifecycle.ViewModelStoreOwner;
|
||||||
import androidx.preference.PreferenceManager;
|
import androidx.preference.PreferenceManager;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.GsonBuilder;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -252,9 +255,10 @@ public class CrossActionHelper {
|
||||||
.connectTimeout(60, TimeUnit.SECONDS)
|
.connectTimeout(60, TimeUnit.SECONDS)
|
||||||
.proxy(Helper.getProxy(context))
|
.proxy(Helper.getProxy(context))
|
||||||
.build();
|
.build();
|
||||||
|
Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss").create();
|
||||||
Retrofit retrofit = new Retrofit.Builder()
|
Retrofit retrofit = new Retrofit.Builder()
|
||||||
.baseUrl("https://" + instance + "/api/v2/")
|
.baseUrl("https://" + instance + "/api/v2/")
|
||||||
.addConverterFactory(GsonConverterFactory.create())
|
.addConverterFactory(GsonConverterFactory.create(gson))
|
||||||
.client(okHttpClient)
|
.client(okHttpClient)
|
||||||
.build();
|
.build();
|
||||||
return retrofit.create(MastodonSearchService.class);
|
return retrofit.create(MastodonSearchService.class);
|
||||||
|
|
|
@ -40,6 +40,8 @@ import com.bumptech.glide.request.RequestListener;
|
||||||
import com.bumptech.glide.request.target.CustomTarget;
|
import com.bumptech.glide.request.target.CustomTarget;
|
||||||
import com.bumptech.glide.request.target.Target;
|
import com.bumptech.glide.request.target.Target;
|
||||||
import com.bumptech.glide.request.transition.Transition;
|
import com.bumptech.glide.request.transition.Transition;
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.GsonBuilder;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -140,10 +142,10 @@ public class NotificationsHelper {
|
||||||
.connectTimeout(60, TimeUnit.SECONDS)
|
.connectTimeout(60, TimeUnit.SECONDS)
|
||||||
.proxy(Helper.getProxy(context))
|
.proxy(Helper.getProxy(context))
|
||||||
.build();
|
.build();
|
||||||
|
Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss").create();
|
||||||
Retrofit retrofit = new Retrofit.Builder()
|
Retrofit retrofit = new Retrofit.Builder()
|
||||||
.baseUrl("https://" + instance + "/api/v1/")
|
.baseUrl("https://" + instance + "/api/v1/")
|
||||||
.addConverterFactory(GsonConverterFactory.create())
|
.addConverterFactory(GsonConverterFactory.create(gson))
|
||||||
.client(okHttpClient)
|
.client(okHttpClient)
|
||||||
.build();
|
.build();
|
||||||
return retrofit.create(MastodonNotificationsService.class);
|
return retrofit.create(MastodonNotificationsService.class);
|
||||||
|
|
|
@ -26,6 +26,9 @@ import android.os.Looper;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.preference.PreferenceManager;
|
import androidx.preference.PreferenceManager;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.GsonBuilder;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
@ -134,9 +137,10 @@ public class PushNotifications {
|
||||||
.connectTimeout(60, TimeUnit.SECONDS)
|
.connectTimeout(60, TimeUnit.SECONDS)
|
||||||
.proxy(Helper.getProxy(context.getApplicationContext()))
|
.proxy(Helper.getProxy(context.getApplicationContext()))
|
||||||
.build();
|
.build();
|
||||||
|
Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss").create();
|
||||||
Retrofit retrofit = new Retrofit.Builder()
|
Retrofit retrofit = new Retrofit.Builder()
|
||||||
.baseUrl("https://" + instance + "/api/v1/")
|
.baseUrl("https://" + instance + "/api/v1/")
|
||||||
.addConverterFactory(GsonConverterFactory.create())
|
.addConverterFactory(GsonConverterFactory.create(gson))
|
||||||
.client(okHttpClient)
|
.client(okHttpClient)
|
||||||
.build();
|
.build();
|
||||||
return retrofit.create(MastodonNotificationsService.class);
|
return retrofit.create(MastodonNotificationsService.class);
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
- Fix crashes for some pleroma instances
|
Loading…
Reference in New Issue