remove callList from BaseActivity (#1503)

* remove callList from BaseActivity

* remove callList from BaseActivity
main
Konrad Pozniak 5 years ago committed by GitHub
parent 165859e197
commit 89eb1e2987
  1. 13
      app/src/main/java/com/keylesspalace/tusky/BaseActivity.java
  2. 1
      app/src/test/java/com/keylesspalace/tusky/BottomSheetActivityTest.kt

@ -50,12 +50,8 @@ import java.util.List;
import javax.inject.Inject;
import retrofit2.Call;
public abstract class BaseActivity extends AppCompatActivity implements Injectable {
protected List<Call> callList;
@Inject
public ThemeUtils themeUtils;
@Inject
@ -95,7 +91,6 @@ public abstract class BaseActivity extends AppCompatActivity implements Injectab
redirectIfNotLoggedIn();
}
callList = new ArrayList<>();
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) {
List<AccountEntity> accounts = accountManager.getAllAccountsOrderedByActive();
AccountEntity activeAccount = accountManager.getActiveAccount();

@ -268,7 +268,6 @@ class BottomSheetActivityTest {
mastodonApi = api
@Suppress("UNCHECKED_CAST")
bottomSheet = mock(BottomSheetBehavior::class.java) as BottomSheetBehavior<LinearLayout>
callList = arrayListOf()
}
override fun openLink(url: String) {

Loading…
Cancel
Save