enable custom emoji fonts for all api levels again
This commit is contained in:
parent
e4803019b8
commit
28940169c6
4 changed files with 4 additions and 19 deletions
|
@ -77,7 +77,7 @@ dependencies {
|
|||
// EmojiCompat
|
||||
implementation "com.android.support:support-emoji:$supportLibraryVersion"
|
||||
implementation "com.android.support:support-emoji-appcompat:$supportLibraryVersion"
|
||||
implementation "de.c1710:filemojicompat:1.0.5"
|
||||
implementation "de.c1710:filemojicompat:1.0.14"
|
||||
// architecture components
|
||||
implementation 'android.arch.lifecycle:extensions:1.1.1'
|
||||
//room
|
||||
|
|
|
@ -72,7 +72,7 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasSupportF
|
|||
private val accountFieldAdapter = AccountFieldAdapter(this)
|
||||
|
||||
private lateinit var accountId: String
|
||||
private var followState: FollowState? = null
|
||||
private var followState: FollowState = FollowState.NOT_FOLLOWING
|
||||
private var blocking: Boolean = false
|
||||
private var muting: Boolean = false
|
||||
private var showingReblogs: Boolean = false
|
||||
|
@ -144,9 +144,6 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasSupportF
|
|||
|
||||
val intent = intent
|
||||
accountId = intent.getStringExtra(KEY_ACCOUNT_ID)
|
||||
followState = FollowState.NOT_FOLLOWING
|
||||
blocking = false
|
||||
muting = false
|
||||
|
||||
loadedAccount = null
|
||||
|
||||
|
@ -299,12 +296,7 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasSupportF
|
|||
accountUsernameTextView.text = usernameFormatted
|
||||
accountDisplayNameTextView.text = CustomEmojiHelper.emojifyString(account.name, account.emojis, accountDisplayNameTextView)
|
||||
if (supportActionBar != null) {
|
||||
try {
|
||||
supportActionBar?.title = EmojiCompat.get().process(account.name)
|
||||
} catch (e: IllegalStateException) {
|
||||
// some Android versions seem to have problems with custom emoji fonts
|
||||
supportActionBar?.title = account.name
|
||||
}
|
||||
|
||||
val subtitle = String.format(getString(R.string.status_username_format),
|
||||
account.username)
|
||||
|
|
|
@ -68,12 +68,6 @@ public class PreferencesFragment extends PreferenceFragment implements SharedPre
|
|||
|
||||
addPreferencesFromResource(preference);
|
||||
|
||||
Preference emojiPreference = findPreference("emojiCompat");
|
||||
if(emojiPreference != null && Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP) {
|
||||
//disable emoji fonts on Android 5 because they cause problems
|
||||
((PreferenceCategory)findPreference("categoryAppearance")).removePreference(emojiPreference);
|
||||
}
|
||||
|
||||
Preference regexPref = findPreference("tabFilterRegex");
|
||||
if (regexPref != null) regexPref.setOnPreferenceClickListener(pref -> {
|
||||
// Reset the error dialog when shown; if the dialog was closed with the cancel button
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:key="@string/preferences_file_key">
|
||||
|
||||
<PreferenceCategory android:title="@string/pref_title_appearance_settings"
|
||||
android:key="categoryAppearance">
|
||||
<PreferenceCategory android:title="@string/pref_title_appearance_settings">
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="night"
|
||||
|
|
Loading…
Reference in a new issue