remove callList from BaseActivity (#1503)
* remove callList from BaseActivity * remove callList from BaseActivity
This commit is contained in:
parent
a84fd6e834
commit
8f92274e0b
2 changed files with 0 additions and 14 deletions
|
@ -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();
|
||||||
|
|
|
@ -268,7 +268,6 @@ class BottomSheetActivityTest {
|
||||||
mastodonApi = api
|
mastodonApi = api
|
||||||
@Suppress("UNCHECKED_CAST")
|
@Suppress("UNCHECKED_CAST")
|
||||||
bottomSheet = mock(BottomSheetBehavior::class.java) as BottomSheetBehavior<LinearLayout>
|
bottomSheet = mock(BottomSheetBehavior::class.java) as BottomSheetBehavior<LinearLayout>
|
||||||
callList = arrayListOf()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun openLink(url: String) {
|
override fun openLink(url: String) {
|
||||||
|
|
Loading…
Reference in a new issue