|
|
@ -50,12 +50,8 @@ import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
import javax.inject.Inject; |
|
|
|
import javax.inject.Inject; |
|
|
|
|
|
|
|
|
|
|
|
import retrofit2.Call; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public abstract class BaseActivity extends AppCompatActivity implements Injectable { |
|
|
|
public abstract class BaseActivity extends AppCompatActivity implements Injectable { |
|
|
|
|
|
|
|
|
|
|
|
protected List<Call> callList; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Inject |
|
|
|
@Inject |
|
|
|
public ThemeUtils themeUtils; |
|
|
|
public ThemeUtils themeUtils; |
|
|
|
@Inject |
|
|
|
@Inject |
|
|
@ -95,7 +91,6 @@ public abstract class BaseActivity extends AppCompatActivity implements Injectab |
|
|
|
redirectIfNotLoggedIn(); |
|
|
|
redirectIfNotLoggedIn(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
callList = new ArrayList<>(); |
|
|
|
|
|
|
|
requesters = new HashMap<>(); |
|
|
|
requesters = new HashMap<>(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -164,14 +159,6 @@ public abstract class BaseActivity extends AppCompatActivity implements Injectab |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
protected void onDestroy() { |
|
|
|
|
|
|
|
for (Call call : callList) { |
|
|
|
|
|
|
|
call.cancel(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
super.onDestroy(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void showAccountChooserDialog(CharSequence dialogTitle, boolean showActiveAccount, AccountSelectionListener listener) { |
|
|
|
public void showAccountChooserDialog(CharSequence dialogTitle, boolean showActiveAccount, AccountSelectionListener listener) { |
|
|
|
List<AccountEntity> accounts = accountManager.getAllAccountsOrderedByActive(); |
|
|
|
List<AccountEntity> accounts = accountManager.getAllAccountsOrderedByActive(); |
|
|
|
AccountEntity activeAccount = accountManager.getActiveAccount(); |
|
|
|
AccountEntity activeAccount = accountManager.getActiveAccount(); |
|
|
|