Dependency injection improvement (#596)

* inject MastodonApi into LoginActivity

* inject AccountManager into MainActivity

* inject AccountManager into SplashActivity, convert to Kotlin

* inject AccountManager into AccountActivity

* inject AccountManager into LoginActivity

* inject AccountManager into NotificationsFragment and NotificationClearBroadcastReceiver, fix MainActivity

* ooops

* use same OkHttpClient for Retrofit & Picasso

* fix ordering of okhttp interceptors

* remove dependencies on TuskyApplication

* bugfix
This commit is contained in:
Konrad Pozniak 2018-04-22 17:20:01 +02:00 committed by GitHub
commit b4ba457d89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 196 additions and 176 deletions

View file

@ -45,8 +45,8 @@ public abstract class BaseActivity extends AppCompatActivity {
/* There isn't presently a way to globally change the theme of a whole application at
* runtime, just individual activities. So, each activity has to set its theme before any
* views are created. */
String theme = preferences.getString("appTheme", TuskyApplication.APP_THEME_DEFAULT);
ThemeUtils.setAppNightMode(theme);
String theme = preferences.getString("appTheme", ThemeUtils.APP_THEME_DEFAULT);
ThemeUtils.setAppNightMode(theme, this);
int style;
switch (preferences.getString("statusTextSize", "medium")) {