Skip to content

Commit 77028cc

Browse files
committed
load fonty in onCreate lastly
1 parent caaab12 commit 77028cc

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

app/src/main/java/org/schabi/newpipe/MainActivity.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,6 @@ public class MainActivity extends AppCompatActivity {
131131

132132
@Override
133133
protected void onCreate(final Bundle savedInstanceState) {
134-
// Apply the preferred font globally
135-
final String preferredFont = getPreferredFont(this);
136-
setUpFont(preferredFont);
137134
if (DEBUG) {
138135
Log.d(TAG, "onCreate() called with: "
139136
+ "savedInstanceState = [" + savedInstanceState + "]");
@@ -178,10 +175,14 @@ protected void onCreate(final Bundle savedInstanceState) {
178175
&& ReleaseVersionUtil.INSTANCE.isReleaseApk()) {
179176
UpdateSettingsFragment.askForConsentToUpdateChecks(this);
180177
}
178+
179+
// Apply the preferred font globally
180+
final String preferredFont = getPreferredFont(this);
181+
setUpFont(preferredFont);
182+
181183
if (!preferredFont.equals(getString(R.string.default_font_key))) {
182184
Fonty.setFonts(this);
183185
}
184-
185186
}
186187

187188
@Override

0 commit comments

Comments
 (0)