Fix a crash when instance is null
This commit is contained in:
parent
50e88b3f86
commit
14bd5e9750
|
@ -1114,7 +1114,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
|
|||
.proxy(Helper.getProxy(getApplication().getApplicationContext()))
|
||||
.build();
|
||||
Retrofit retrofit = new Retrofit.Builder()
|
||||
.baseUrl("https://" + IDN.toASCII(MainActivity.currentInstance, IDN.ALLOW_UNASSIGNED) + "/api/v1/")
|
||||
.baseUrl("https://" + (MainActivity.currentInstance != null ? IDN.toASCII(MainActivity.currentInstance, IDN.ALLOW_UNASSIGNED) : null) + "/api/v1/")
|
||||
.addConverterFactory(GsonConverterFactory.create(Helper.getDateBuilder()))
|
||||
.client(okHttpClient)
|
||||
.build();
|
||||
|
|
|
@ -62,7 +62,7 @@ public class TimelineHelper {
|
|||
.proxy(Helper.getProxy(context))
|
||||
.build();
|
||||
Retrofit retrofit = new Retrofit.Builder()
|
||||
.baseUrl("https://" + IDN.toASCII(BaseMainActivity.currentInstance, IDN.ALLOW_UNASSIGNED) + "/api/v2/")
|
||||
.baseUrl("https://" + (MainActivity.currentInstance != null ? IDN.toASCII(MainActivity.currentInstance, IDN.ALLOW_UNASSIGNED) : null) + "/api/v2/")
|
||||
.addConverterFactory(GsonConverterFactory.create())
|
||||
.client(okHttpClient)
|
||||
.build();
|
||||
|
|
Loading…
Reference in New Issue