mirror of
https://github.com/leanote/leanote-android.git
synced 2025-10-16 23:44:27 +00:00
temporary fix crash
This commit is contained in:
@@ -26,14 +26,14 @@ public class ApiProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static ApiProvider getInstance() {
|
public static ApiProvider getInstance() {
|
||||||
|
Account account = AccountService.getCurrent();
|
||||||
|
if (account != null && SingletonHolder.INSTANCE.mApiRetrofit == null) {
|
||||||
|
SingletonHolder.INSTANCE.init(account.getHost());
|
||||||
|
}
|
||||||
return SingletonHolder.INSTANCE;
|
return SingletonHolder.INSTANCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
private ApiProvider() {
|
private ApiProvider() {
|
||||||
Account account = AccountService.getCurrent();
|
|
||||||
if (account != null) {
|
|
||||||
init(account.getHost());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init(String host) {
|
public void init(String host) {
|
||||||
|
Reference in New Issue
Block a user