Removed app context for PreferenceUtil class

This commit is contained in:
h4h13 2019-09-09 18:34:53 +05:30
parent 5df5f6c93e
commit 2bbe39eab7
97 changed files with 397 additions and 456 deletions

View file

@ -31,9 +31,9 @@ class BottomNavigationBarTinted @JvmOverloads constructor(
) : BottomNavigationView(context, attrs, defStyleAttr) {
init {
labelVisibilityMode = PreferenceUtil.getInstance().tabTitleMode
labelVisibilityMode = PreferenceUtil.getInstance(context).tabTitleMode
setBackgroundColor(ThemeStore.primaryColor(context))
selectedItemId = PreferenceUtil.getInstance().lastPage
selectedItemId = PreferenceUtil.getInstance(context).lastPage
val iconColor = ATHUtil.resolveColor(context, R.attr.iconColor)
val accentColor = ThemeStore.accentColor(context)

View file

@ -62,7 +62,7 @@ public class UserImageView extends CircularImageView implements SharedPreference
.asDrawable()
.placeholder(R.drawable.ic_account_white_24dp)
.fallback(R.drawable.ic_account_white_24dp)
.load(new File(PreferenceUtil.getInstance().getProfileImage(), USER_PROFILE))
.load(new File(PreferenceUtil.getInstance(context).getProfileImage(), USER_PROFILE))
.into(new Target<Drawable>() {
@Override
public void onLoadStarted(@Nullable Drawable placeholder) {