Remove the implemented prefs with db
This commit is contained in:
parent
1f538a4b40
commit
8fc54dd240
|
@ -50,6 +50,7 @@ import org.mian.gitnex.databinding.CustomAssigneesSelectionDialogBinding;
|
|||
import org.mian.gitnex.databinding.CustomLabelsSelectionDialogBinding;
|
||||
import org.mian.gitnex.fragments.IssuesFragment;
|
||||
import org.mian.gitnex.helpers.AlertDialogs;
|
||||
import org.mian.gitnex.helpers.AppDatabaseSettings;
|
||||
import org.mian.gitnex.helpers.Constants;
|
||||
import org.mian.gitnex.helpers.Markdown;
|
||||
import org.mian.gitnex.helpers.SnackBar;
|
||||
|
@ -315,6 +316,10 @@ public class CreateIssueActivity extends BaseActivity
|
|||
builder.setTitleText(R.string.newIssueDueDateTitle);
|
||||
MaterialDatePicker<Long> materialDatePicker = builder.build();
|
||||
|
||||
String[] locale_ =
|
||||
AppDatabaseSettings.getSettingsValue(ctx, AppDatabaseSettings.APP_LOCALE_KEY)
|
||||
.split("\\|");
|
||||
|
||||
viewBinding.newIssueDueDate.setOnClickListener(
|
||||
v -> materialDatePicker.show(getSupportFragmentManager(), "DATE_PICKER"));
|
||||
|
||||
|
@ -323,8 +328,7 @@ public class CreateIssueActivity extends BaseActivity
|
|||
Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
|
||||
calendar.setTimeInMillis(selection);
|
||||
SimpleDateFormat format =
|
||||
new SimpleDateFormat(
|
||||
"yyyy-MM-dd", new Locale(tinyDB.getString("locale")));
|
||||
new SimpleDateFormat("yyyy-MM-dd", new Locale(locale_[1]));
|
||||
String formattedDate = format.format(calendar.getTime());
|
||||
viewBinding.newIssueDueDate.setText(formattedDate);
|
||||
});
|
||||
|
|
|
@ -21,6 +21,7 @@ import org.mian.gitnex.R;
|
|||
import org.mian.gitnex.clients.RetrofitClient;
|
||||
import org.mian.gitnex.databinding.ActivityCreateMilestoneBinding;
|
||||
import org.mian.gitnex.helpers.AlertDialogs;
|
||||
import org.mian.gitnex.helpers.AppDatabaseSettings;
|
||||
import org.mian.gitnex.helpers.Markdown;
|
||||
import org.mian.gitnex.helpers.SnackBar;
|
||||
import org.mian.gitnex.helpers.contexts.RepositoryContext;
|
||||
|
@ -109,6 +110,10 @@ public class CreateMilestoneActivity extends BaseActivity {
|
|||
builder.setTitleText(R.string.newIssueDueDateTitle);
|
||||
MaterialDatePicker<Long> materialDatePicker = builder.build();
|
||||
|
||||
String[] locale_ =
|
||||
AppDatabaseSettings.getSettingsValue(ctx, AppDatabaseSettings.APP_LOCALE_KEY)
|
||||
.split("\\|");
|
||||
|
||||
binding.milestoneDueDate.setOnClickListener(
|
||||
v -> materialDatePicker.show(getSupportFragmentManager(), "DATE_PICKER"));
|
||||
|
||||
|
@ -117,8 +122,7 @@ public class CreateMilestoneActivity extends BaseActivity {
|
|||
Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
|
||||
calendar.setTimeInMillis(selection);
|
||||
SimpleDateFormat format =
|
||||
new SimpleDateFormat(
|
||||
"yyyy-MM-dd", new Locale(tinyDB.getString("locale")));
|
||||
new SimpleDateFormat("yyyy-MM-dd", new Locale(locale_[1]));
|
||||
String formattedDate = format.format(calendar.getTime());
|
||||
binding.milestoneDueDate.setText(formattedDate);
|
||||
});
|
||||
|
|
|
@ -47,6 +47,7 @@ import org.mian.gitnex.databinding.BottomSheetAttachmentsBinding;
|
|||
import org.mian.gitnex.databinding.CustomLabelsSelectionDialogBinding;
|
||||
import org.mian.gitnex.fragments.PullRequestsFragment;
|
||||
import org.mian.gitnex.helpers.AlertDialogs;
|
||||
import org.mian.gitnex.helpers.AppDatabaseSettings;
|
||||
import org.mian.gitnex.helpers.Constants;
|
||||
import org.mian.gitnex.helpers.Markdown;
|
||||
import org.mian.gitnex.helpers.SnackBar;
|
||||
|
@ -429,6 +430,10 @@ public class CreatePullRequestActivity extends BaseActivity
|
|||
builder.setTitleText(R.string.newIssueDueDateTitle);
|
||||
MaterialDatePicker<Long> materialDatePicker = builder.build();
|
||||
|
||||
String[] locale_ =
|
||||
AppDatabaseSettings.getSettingsValue(ctx, AppDatabaseSettings.APP_LOCALE_KEY)
|
||||
.split("\\|");
|
||||
|
||||
viewBinding.prDueDate.setOnClickListener(
|
||||
v -> materialDatePicker.show(getSupportFragmentManager(), "DATE_PICKER"));
|
||||
|
||||
|
@ -437,8 +442,7 @@ public class CreatePullRequestActivity extends BaseActivity
|
|||
Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
|
||||
calendar.setTimeInMillis(selection);
|
||||
SimpleDateFormat format =
|
||||
new SimpleDateFormat(
|
||||
"yyyy-MM-dd", new Locale(tinyDB.getString("locale")));
|
||||
new SimpleDateFormat("yyyy-MM-dd", new Locale(locale_[1]));
|
||||
String formattedDate = format.format(calendar.getTime());
|
||||
viewBinding.prDueDate.setText(formattedDate);
|
||||
});
|
||||
|
|
|
@ -33,6 +33,7 @@ import org.mian.gitnex.databinding.ActivityEditIssueBinding;
|
|||
import org.mian.gitnex.fragments.IssuesFragment;
|
||||
import org.mian.gitnex.fragments.PullRequestsFragment;
|
||||
import org.mian.gitnex.helpers.AlertDialogs;
|
||||
import org.mian.gitnex.helpers.AppDatabaseSettings;
|
||||
import org.mian.gitnex.helpers.Constants;
|
||||
import org.mian.gitnex.helpers.Markdown;
|
||||
import org.mian.gitnex.helpers.SnackBar;
|
||||
|
@ -247,6 +248,10 @@ public class EditIssueActivity extends BaseActivity {
|
|||
builder.setTitleText(R.string.newIssueDueDateTitle);
|
||||
MaterialDatePicker<Long> materialDatePicker = builder.build();
|
||||
|
||||
String[] locale_ =
|
||||
AppDatabaseSettings.getSettingsValue(ctx, AppDatabaseSettings.APP_LOCALE_KEY)
|
||||
.split("\\|");
|
||||
|
||||
binding.editIssueDueDate.setOnClickListener(
|
||||
v -> materialDatePicker.show(getSupportFragmentManager(), "DATE_PICKER"));
|
||||
|
||||
|
@ -255,8 +260,7 @@ public class EditIssueActivity extends BaseActivity {
|
|||
Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
|
||||
calendar.setTimeInMillis(selection);
|
||||
SimpleDateFormat format =
|
||||
new SimpleDateFormat(
|
||||
"yyyy-MM-dd", new Locale(tinyDB.getString("locale")));
|
||||
new SimpleDateFormat("yyyy-MM-dd", new Locale(locale_[1]));
|
||||
String formattedDate = format.format(calendar.getTime());
|
||||
binding.editIssueDueDate.setText(formattedDate);
|
||||
});
|
||||
|
|
|
@ -73,6 +73,7 @@ import org.mian.gitnex.fragments.BottomSheetReplyFragment;
|
|||
import org.mian.gitnex.fragments.BottomSheetSingleIssueFragment;
|
||||
import org.mian.gitnex.fragments.IssuesFragment;
|
||||
import org.mian.gitnex.helpers.AlertDialogs;
|
||||
import org.mian.gitnex.helpers.AppDatabaseSettings;
|
||||
import org.mian.gitnex.helpers.AppUtil;
|
||||
import org.mian.gitnex.helpers.ClickListener;
|
||||
import org.mian.gitnex.helpers.ColorInverter;
|
||||
|
@ -857,18 +858,34 @@ public class IssueDetailActivity extends BaseActivity
|
|||
} else { // open
|
||||
|
||||
viewBinding.issuePrState.setImageResource(R.drawable.ic_pull_request);
|
||||
if (tinyDB.getInt("themeId") == 3) {
|
||||
if (Integer.parseInt(
|
||||
AppDatabaseSettings.getSettingsValue(
|
||||
ctx, AppDatabaseSettings.APP_THEME_KEY))
|
||||
== 3) {
|
||||
ImageViewCompat.setImageTintList(
|
||||
viewBinding.issuePrState,
|
||||
ColorStateList.valueOf(
|
||||
ctx.getResources()
|
||||
.getColor(R.color.retroThemeColorPrimary, null)));
|
||||
} else if (tinyDB.getInt("themeId") == 4) {
|
||||
} else if (Integer.parseInt(
|
||||
AppDatabaseSettings.getSettingsValue(
|
||||
ctx, AppDatabaseSettings.APP_THEME_KEY))
|
||||
== 4) {
|
||||
if (TimeHelper.timeBetweenHours(
|
||||
tinyDB.getInt("darkThemeTimeHour", 18),
|
||||
tinyDB.getInt("lightThemeTimeHour", 6),
|
||||
tinyDB.getInt("darkThemeTimeMinute", 0),
|
||||
tinyDB.getInt("lightThemeTimeMinute", 0))) {
|
||||
Integer.parseInt(
|
||||
AppDatabaseSettings.getSettingsValue(
|
||||
ctx, AppDatabaseSettings.APP_THEME_AUTO_DARK_HOUR_KEY)),
|
||||
Integer.parseInt(
|
||||
AppDatabaseSettings.getSettingsValue(
|
||||
ctx,
|
||||
AppDatabaseSettings.APP_THEME_AUTO_LIGHT_HOUR_KEY)),
|
||||
Integer.parseInt(
|
||||
AppDatabaseSettings.getSettingsValue(
|
||||
ctx, AppDatabaseSettings.APP_THEME_AUTO_DARK_MIN_KEY)),
|
||||
Integer.parseInt(
|
||||
AppDatabaseSettings.getSettingsValue(
|
||||
ctx,
|
||||
AppDatabaseSettings.APP_THEME_AUTO_LIGHT_MIN_KEY)))) {
|
||||
ImageViewCompat.setImageTintList(
|
||||
viewBinding.issuePrState,
|
||||
ColorStateList.valueOf(
|
||||
|
@ -880,7 +897,10 @@ public class IssueDetailActivity extends BaseActivity
|
|||
ctx.getResources()
|
||||
.getColor(R.color.retroThemeColorPrimary, null)));
|
||||
}
|
||||
} else if (tinyDB.getInt("themeId") == 8) {
|
||||
} else if (Integer.parseInt(
|
||||
AppDatabaseSettings.getSettingsValue(
|
||||
ctx, AppDatabaseSettings.APP_THEME_KEY))
|
||||
== 8) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
ImageViewCompat.setImageTintList(
|
||||
viewBinding.issuePrState,
|
||||
|
@ -908,17 +928,31 @@ public class IssueDetailActivity extends BaseActivity
|
|||
loadingFinishedPr = true;
|
||||
updateMenuState();
|
||||
viewBinding.issuePrState.setImageResource(R.drawable.ic_issue);
|
||||
if (tinyDB.getInt("themeId") == 3) {
|
||||
if (Integer.parseInt(
|
||||
AppDatabaseSettings.getSettingsValue(
|
||||
ctx, AppDatabaseSettings.APP_THEME_KEY))
|
||||
== 3) {
|
||||
ImageViewCompat.setImageTintList(
|
||||
viewBinding.issuePrState,
|
||||
ColorStateList.valueOf(
|
||||
ctx.getResources().getColor(R.color.retroThemeColorPrimary, null)));
|
||||
} else if (tinyDB.getInt("themeId") == 4) {
|
||||
} else if (Integer.parseInt(
|
||||
AppDatabaseSettings.getSettingsValue(
|
||||
ctx, AppDatabaseSettings.APP_THEME_KEY))
|
||||
== 4) {
|
||||
if (TimeHelper.timeBetweenHours(
|
||||
tinyDB.getInt("darkThemeTimeHour", 18),
|
||||
tinyDB.getInt("lightThemeTimeHour", 6),
|
||||
tinyDB.getInt("darkThemeTimeMinute", 0),
|
||||
tinyDB.getInt("lightThemeTimeMinute", 0))) {
|
||||
Integer.parseInt(
|
||||
AppDatabaseSettings.getSettingsValue(
|
||||
ctx, AppDatabaseSettings.APP_THEME_AUTO_DARK_HOUR_KEY)),
|
||||
Integer.parseInt(
|
||||
AppDatabaseSettings.getSettingsValue(
|
||||
ctx, AppDatabaseSettings.APP_THEME_AUTO_LIGHT_HOUR_KEY)),
|
||||
Integer.parseInt(
|
||||
AppDatabaseSettings.getSettingsValue(
|
||||
ctx, AppDatabaseSettings.APP_THEME_AUTO_DARK_MIN_KEY)),
|
||||
Integer.parseInt(
|
||||
AppDatabaseSettings.getSettingsValue(
|
||||
ctx, AppDatabaseSettings.APP_THEME_AUTO_LIGHT_MIN_KEY)))) {
|
||||
ImageViewCompat.setImageTintList(
|
||||
viewBinding.issuePrState,
|
||||
ColorStateList.valueOf(
|
||||
|
@ -930,7 +964,10 @@ public class IssueDetailActivity extends BaseActivity
|
|||
ctx.getResources()
|
||||
.getColor(R.color.retroThemeColorPrimary, null)));
|
||||
}
|
||||
} else if (tinyDB.getInt("themeId") == 8) {
|
||||
} else if (Integer.parseInt(
|
||||
AppDatabaseSettings.getSettingsValue(
|
||||
ctx, AppDatabaseSettings.APP_THEME_KEY))
|
||||
== 8) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
ImageViewCompat.setImageTintList(
|
||||
viewBinding.issuePrState,
|
||||
|
|
|
@ -55,6 +55,7 @@ import org.mian.gitnex.databinding.CustomImageViewDialogBinding;
|
|||
import org.mian.gitnex.fragments.BottomSheetReplyFragment;
|
||||
import org.mian.gitnex.fragments.IssuesFragment;
|
||||
import org.mian.gitnex.helpers.AlertDialogs;
|
||||
import org.mian.gitnex.helpers.AppDatabaseSettings;
|
||||
import org.mian.gitnex.helpers.AppUtil;
|
||||
import org.mian.gitnex.helpers.ClickListener;
|
||||
import org.mian.gitnex.helpers.ColorInverter;
|
||||
|
@ -572,7 +573,11 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||
text.indexOf('|') + 1,
|
||||
Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
|
||||
if (tinyDB.getInt("themeId") == 8) {
|
||||
if (Integer.parseInt(
|
||||
AppDatabaseSettings.getSettingsValue(
|
||||
context,
|
||||
AppDatabaseSettings.APP_THEME_KEY))
|
||||
== 8) {
|
||||
if (!isNightModeThemeDynamic(context)) {
|
||||
textView.setTextColor(
|
||||
AppUtil.dynamicColorResource(context));
|
||||
|
@ -612,7 +617,10 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||
issueComment.getUser().getLogin(),
|
||||
commitText,
|
||||
info);
|
||||
if (tinyDB.getInt("themeId") == 8) {
|
||||
if (Integer.parseInt(
|
||||
AppDatabaseSettings.getSettingsValue(
|
||||
context, AppDatabaseSettings.APP_THEME_KEY))
|
||||
== 8) {
|
||||
if (!isNightModeThemeDynamic(context)) {
|
||||
start.setTextColor(AppUtil.dynamicColorResource(context));
|
||||
}
|
||||
|
@ -678,7 +686,10 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||
|
||||
TextView start = new TextView(context);
|
||||
|
||||
if (tinyDB.getInt("themeId") == 8) {
|
||||
if (Integer.parseInt(
|
||||
AppDatabaseSettings.getSettingsValue(
|
||||
context, AppDatabaseSettings.APP_THEME_KEY))
|
||||
== 8) {
|
||||
if (!isNightModeThemeDynamic(context)) {
|
||||
start.setTextColor(AppUtil.dynamicColorResource(context));
|
||||
}
|
||||
|
@ -736,7 +747,10 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||
|
||||
TextView start = new TextView(context);
|
||||
|
||||
if (tinyDB.getInt("themeId") == 8) {
|
||||
if (Integer.parseInt(
|
||||
AppDatabaseSettings.getSettingsValue(
|
||||
context, AppDatabaseSettings.APP_THEME_KEY))
|
||||
== 8) {
|
||||
if (!isNightModeThemeDynamic(context)) {
|
||||
start.setTextColor(AppUtil.dynamicColorResource(context));
|
||||
}
|
||||
|
@ -781,7 +795,10 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||
|
||||
TextView start = new TextView(context);
|
||||
|
||||
if (tinyDB.getInt("themeId") == 8) {
|
||||
if (Integer.parseInt(
|
||||
AppDatabaseSettings.getSettingsValue(
|
||||
context, AppDatabaseSettings.APP_THEME_KEY))
|
||||
== 8) {
|
||||
if (!isNightModeThemeDynamic(context)) {
|
||||
start.setTextColor(AppUtil.dynamicColorResource(context));
|
||||
}
|
||||
|
@ -914,7 +931,10 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||
|
||||
TextView start = new TextView(context);
|
||||
|
||||
if (tinyDB.getInt("themeId") == 8) {
|
||||
if (Integer.parseInt(
|
||||
AppDatabaseSettings.getSettingsValue(
|
||||
context, AppDatabaseSettings.APP_THEME_KEY))
|
||||
== 8) {
|
||||
if (!isNightModeThemeDynamic(context)) {
|
||||
start.setTextColor(AppUtil.dynamicColorResource(context));
|
||||
}
|
||||
|
@ -967,7 +987,10 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||
|
||||
TextView start = new TextView(context);
|
||||
|
||||
if (tinyDB.getInt("themeId") == 8) {
|
||||
if (Integer.parseInt(
|
||||
AppDatabaseSettings.getSettingsValue(
|
||||
context, AppDatabaseSettings.APP_THEME_KEY))
|
||||
== 8) {
|
||||
if (!isNightModeThemeDynamic(context)) {
|
||||
start.setTextColor(AppUtil.dynamicColorResource(context));
|
||||
}
|
||||
|
@ -992,7 +1015,10 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||
|
||||
TextView start = new TextView(context);
|
||||
|
||||
if (tinyDB.getInt("themeId") == 8) {
|
||||
if (Integer.parseInt(
|
||||
AppDatabaseSettings.getSettingsValue(
|
||||
context, AppDatabaseSettings.APP_THEME_KEY))
|
||||
== 8) {
|
||||
if (!isNightModeThemeDynamic(context)) {
|
||||
start.setTextColor(AppUtil.dynamicColorResource(context));
|
||||
}
|
||||
|
@ -1026,7 +1052,10 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||
|
||||
TextView start = new TextView(context);
|
||||
|
||||
if (tinyDB.getInt("themeId") == 8) {
|
||||
if (Integer.parseInt(
|
||||
AppDatabaseSettings.getSettingsValue(
|
||||
context, AppDatabaseSettings.APP_THEME_KEY))
|
||||
== 8) {
|
||||
if (!isNightModeThemeDynamic(context)) {
|
||||
start.setTextColor(AppUtil.dynamicColorResource(context));
|
||||
}
|
||||
|
@ -1062,7 +1091,10 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||
|
||||
TextView start = new TextView(context);
|
||||
|
||||
if (tinyDB.getInt("themeId") == 8) {
|
||||
if (Integer.parseInt(
|
||||
AppDatabaseSettings.getSettingsValue(
|
||||
context, AppDatabaseSettings.APP_THEME_KEY))
|
||||
== 8) {
|
||||
if (!isNightModeThemeDynamic(context)) {
|
||||
start.setTextColor(AppUtil.dynamicColorResource(context));
|
||||
}
|
||||
|
@ -1097,7 +1129,10 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||
|
||||
TextView start = new TextView(context);
|
||||
|
||||
if (tinyDB.getInt("themeId") == 8) {
|
||||
if (Integer.parseInt(
|
||||
AppDatabaseSettings.getSettingsValue(
|
||||
context, AppDatabaseSettings.APP_THEME_KEY))
|
||||
== 8) {
|
||||
if (!isNightModeThemeDynamic(context)) {
|
||||
start.setTextColor(AppUtil.dynamicColorResource(context));
|
||||
}
|
||||
|
@ -1142,7 +1177,10 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||
|
||||
TextView start = new TextView(context);
|
||||
|
||||
if (tinyDB.getInt("themeId") == 8) {
|
||||
if (Integer.parseInt(
|
||||
AppDatabaseSettings.getSettingsValue(
|
||||
context, AppDatabaseSettings.APP_THEME_KEY))
|
||||
== 8) {
|
||||
if (!isNightModeThemeDynamic(context)) {
|
||||
start.setTextColor(AppUtil.dynamicColorResource(context));
|
||||
}
|
||||
|
@ -1182,7 +1220,10 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||
|
||||
TextView start = new TextView(context);
|
||||
|
||||
if (tinyDB.getInt("themeId") == 8) {
|
||||
if (Integer.parseInt(
|
||||
AppDatabaseSettings.getSettingsValue(
|
||||
context, AppDatabaseSettings.APP_THEME_KEY))
|
||||
== 8) {
|
||||
if (!isNightModeThemeDynamic(context)) {
|
||||
start.setTextColor(AppUtil.dynamicColorResource(context));
|
||||
}
|
||||
|
@ -1293,7 +1334,10 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||
else if (issueComment.getType().equalsIgnoreCase("pin")) {
|
||||
TextView start = new TextView(context);
|
||||
|
||||
if (tinyDB.getInt("themeId") == 8) {
|
||||
if (Integer.parseInt(
|
||||
AppDatabaseSettings.getSettingsValue(
|
||||
context, AppDatabaseSettings.APP_THEME_KEY))
|
||||
== 8) {
|
||||
if (!isNightModeThemeDynamic(context)) {
|
||||
start.setTextColor(AppUtil.dynamicColorResource(context));
|
||||
}
|
||||
|
|
|
@ -333,8 +333,10 @@ public class AppUtil {
|
|||
|
||||
public static String getTimestampFromDate(Context context, Date date) {
|
||||
|
||||
TinyDB tinyDB = TinyDB.getInstance(context);
|
||||
Locale locale = new Locale(tinyDB.getString("locale"));
|
||||
String[] locale_ =
|
||||
AppDatabaseSettings.getSettingsValue(context, AppDatabaseSettings.APP_LOCALE_KEY)
|
||||
.split("\\|");
|
||||
Locale locale = new Locale(locale_[1]);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX", locale).format(date);
|
||||
|
|
|
@ -211,7 +211,12 @@ public class Markdown {
|
|||
if (tf == null) {
|
||||
tf = AppUtil.getTypeface(textView.getContext());
|
||||
}
|
||||
if (tinyDB.getInt("themeId") == 8) {
|
||||
if (Integer.parseInt(
|
||||
AppDatabaseSettings.getSettingsValue(
|
||||
context,
|
||||
AppDatabaseSettings
|
||||
.APP_THEME_KEY))
|
||||
== 8) {
|
||||
if (!isNightModeThemeDynamic(context)) {
|
||||
textView.setTextColor(
|
||||
AppUtil.dynamicColorResource(context));
|
||||
|
@ -375,7 +380,12 @@ public class Markdown {
|
|||
if (tf == null) {
|
||||
tf = AppUtil.getTypeface(context);
|
||||
}
|
||||
if (tinyDB.getInt("themeId") == 8) {
|
||||
if (Integer.parseInt(
|
||||
AppDatabaseSettings.getSettingsValue(
|
||||
context,
|
||||
AppDatabaseSettings
|
||||
.APP_THEME_KEY))
|
||||
== 8) {
|
||||
if (!isNightModeThemeDynamic(context)) {
|
||||
textView.setTextColor(
|
||||
AppUtil.dynamicColorResource(context));
|
||||
|
|
Loading…
Reference in New Issue