|
|
|
@ -40,6 +40,8 @@ import com.bumptech.glide.request.RequestListener;
|
|
|
|
|
import com.bumptech.glide.request.target.CustomTarget;
|
|
|
|
|
import com.bumptech.glide.request.target.Target;
|
|
|
|
|
import com.bumptech.glide.request.transition.Transition;
|
|
|
|
|
import com.google.gson.Gson;
|
|
|
|
|
import com.google.gson.GsonBuilder;
|
|
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
@ -140,10 +142,10 @@ public class NotificationsHelper {
|
|
|
|
|
.connectTimeout(60, TimeUnit.SECONDS)
|
|
|
|
|
.proxy(Helper.getProxy(context))
|
|
|
|
|
.build();
|
|
|
|
|
|
|
|
|
|
Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss").create();
|
|
|
|
|
Retrofit retrofit = new Retrofit.Builder()
|
|
|
|
|
.baseUrl("https://" + instance + "/api/v1/")
|
|
|
|
|
.addConverterFactory(GsonConverterFactory.create())
|
|
|
|
|
.addConverterFactory(GsonConverterFactory.create(gson))
|
|
|
|
|
.client(okHttpClient)
|
|
|
|
|
.build();
|
|
|
|
|
return retrofit.create(MastodonNotificationsService.class);
|
|
|
|
|