Improve Dependency Injection (#1120)

* inject TimelineCases directly into SFragment

* inject ThemeUtils
This commit is contained in:
Konrad Pozniak 2019-03-11 17:25:11 +01:00 committed by GitHub
commit 5f390b378b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 21 additions and 53 deletions

View file

@ -29,11 +29,19 @@ import androidx.appcompat.app.AppCompatDelegate;
import android.provider.Settings;
import android.util.TypedValue;
import javax.inject.Inject;
import javax.inject.Singleton;
/**
* Provides runtime compatibility to obtain theme information and re-theme views, especially where
* the ability to do so is not supported in resource files.
*/
@Singleton
public class ThemeUtils {
@Inject
public ThemeUtils(){}
public static final String APP_THEME_DEFAULT = ThemeUtils.THEME_NIGHT;
private static final String THEME_NIGHT = "night";