Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lingyicute2323 committed Nov 27, 2024
1 parent 1bad4b6 commit 246f03c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 31 deletions.
32 changes: 3 additions & 29 deletions TMessagesProj/src/main/java/org/telegram/ui/ActionBar/Theme.java
Original file line number Diff line number Diff line change
Expand Up @@ -4331,32 +4331,6 @@ public void run() {
SharedPreferences themeConfig = ApplicationLoader.applicationContext.getSharedPreferences("themeconfig", Activity.MODE_PRIVATE);

ThemeInfo themeInfo = new ThemeInfo();
themeInfo.name = "Blue";
themeInfo.assetName = "bluebubbles.attheme";
themeInfo.previewBackgroundColor = 0xff95beec;
themeInfo.previewInColor = 0xffffffff;
themeInfo.previewOutColor = 0xffd0e6ff;
themeInfo.firstAccentIsDefault = true;
themeInfo.currentAccentId = DEFALT_THEME_ACCENT_ID;
themeInfo.sortIndex = 1;
themeInfo.setAccentColorOptions(
new int[] { 0xFF5890C5, 0xFF239853, 0xFFCE5E82, 0xFF7F63C3, 0xFF2491AD, 0xFF299C2F, 0xFF8854B4, 0xFF328ACF, 0xFF43ACC7, 0xFF52AC44, 0xFFCD5F93, 0xFFD28036, 0xFF8366CC, 0xFFCE4E57, 0xFFD3AE40, 0xFF7B88AB},
new int[] { 0xFFB8E18D, 0xFFFAFBCC, 0xFFFFF9DC, 0xFFC14F6E, 0xFFD1BD1B, 0xFFFFFAC9, 0xFFFCF6D8, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
new int[] { 0x00000000, 0xFFF2FBC9, 0xFFFBF4DF, 0, 0, 0xFFFDEDB4, 0xFFFCF7B6, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
new int[] { 0x00000000, 0xFFdfe2a0, 0xFFf1b290, 0xFFd7c1e9, 0xFFd7b89e, 0xFFec9e73, 0xFFcbb0e4, 0xff9bbce7, 0xff91c5ec, 0xff9bc982, 0xffe4a1c1, 0xffe3ae7d, 0xffb8aaea, 0xffeb9c79, 0xffd3bc74, 0xffa0aace},
new int[] { 0x00000000, 0xFFbad89d, 0xFFeccf94, 0xFFe8bdd6, 0xFFe6dec2, 0xFFe8d085, 0xFFebc8e9, 0xffc0d9f3, 0xffbfdfec, 0xffe0dd93, 0xffe9bed6, 0xffecd5a2, 0xffc5c9ee, 0xfff0bd99, 0xffe9df9e, 0xffcacedd},
new int[] { 0x00000000, 0xFFe2dea7, 0xFFe7b384, 0xFFd2aee9, 0xFFdac5ae, 0xFFeea677, 0xFFdfa8d1, 0xff95c3eb, 0xffb5e1d9, 0xffbed595, 0xffcca8e1, 0xffdfb076, 0xffb3b1e2, 0xffe79db4, 0xffe0c88b, 0xffa6add2},
new int[] { 0x00000000, 0xFF9ec790, 0xFFebdea8, 0xFFeccb88, 0xFFe5dcbf, 0xFFede4a9, 0xFFedc8a8, 0xffbbd5e8, 0xffbfdbe8, 0xffd1db97, 0xffefcbd7, 0xffecd694, 0xffdfbeed, 0xfff3b182, 0xffe5d397, 0xffcacee8},
new int[] { 99, 9, 10, 11, 12, 13, 14, 0, 1, 2, 3, 4, 5, 6, 7, 8},
new String[] { "", "p-pXcflrmFIBAAAAvXYQk-mCwZU", "JqSUrO0-mFIBAAAAWwTvLzoWGQI", "O-wmAfBPSFADAAAA4zINVfD_bro", "RepJ5uE_SVABAAAAr4d0YhgB850", "-Xc-np9y2VMCAAAARKr0yNNPYW0", "fqv01SQemVIBAAAApND8LDRUhRU", "fqv01SQemVIBAAAApND8LDRUhRU", "RepJ5uE_SVABAAAAr4d0YhgB850", "lp0prF8ISFAEAAAA_p385_CvG0w", "heptcj-hSVACAAAAC9RrMzOa-cs", "PllZ-bf_SFAEAAAA8crRfwZiDNg", "dhf9pceaQVACAAAAbzdVo4SCiZA", "Ujx2TFcJSVACAAAARJ4vLa50MkM", "p-pXcflrmFIBAAAAvXYQk-mCwZU", "dk_wwlghOFACAAAAfz9xrxi6euw"},
new int[] { 0, 180, 45, 0, 45, 180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
new int[] { 0, 52, 46, 57, 45, 64, 52, 35, 36, 41, 50, 50, 35, 38, 37, 30}
);
sortAccents(themeInfo);
themes.add(currentDayTheme = currentTheme = defaultTheme = themeInfo);
themesDict.put("Blue", themeInfo);

themeInfo = new ThemeInfo();
themeInfo.name = "Dark Blue";
themeInfo.assetName = "darkblue.attheme";
themeInfo.previewBackgroundColor = 0xff5f6e82;
Expand Down Expand Up @@ -4386,7 +4360,7 @@ public void run() {
themeInfo.previewBackgroundColor = 0xffe1e9f0;
themeInfo.previewInColor = 0xffffffff;
themeInfo.previewOutColor = 0xff6ca1eb;
themeInfo.sortIndex = 5;
themeInfo.sortIndex = 1;
themeInfo.setAccentColorOptions(
new int[] { 0xFF40B1E2, 0xFF41B05D, 0xFFCE8C20, 0xFF57A3EB, 0xFFDE8534, 0xFFCC6189, 0xFF3490EB, 0xFF43ACC7, 0xFF52AC44, 0xFFCD5F93, 0xFFD28036, 0xFF8366CC, 0xFFCE4E57, 0xFFD3AE40, 0xFF7B88AB},
new int[] { 0xFF319FCA, 0xFF28A359, 0xFF8C5A3F, 0xFF3085D3, 0xFFC95870, 0xFF7871CD, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
Expand All @@ -4402,7 +4376,7 @@ public void run() {
);
sortAccents(themeInfo);
themes.add(themeInfo);
themesDict.put("Arctic Blue", themeInfo);
themesDict.put("Arctic Blue", currentDayTheme = currentTheme = defaultTheme = themeInfo);

themeInfo = new ThemeInfo();
themeInfo.name = "Day";
Expand Down Expand Up @@ -4526,7 +4500,7 @@ public void run() {

String theme = preferences.getString("theme", null);
if ("Default".equals(theme)) {
applyingTheme = themesDict.get("Blue");
applyingTheme = themesDict.get("Arctic Blue");
applyingTheme.currentAccentId = DEFALT_THEME_ACCENT_ID;
} else if ("Dark".equals(theme)) {
applyingTheme = themeDarkBlue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("themeconfig", Activity.MODE_PRIVATE);
String dayThemeName = preferences.getString("lastDayTheme", "Arctic Blue");
if (Theme.getTheme(dayThemeName) == null || Theme.getTheme(dayThemeName).isDark()) {
dayThemeName = "Blue";
dayThemeName = "Arctic Blue";
}
String nightThemeName = preferences.getString("lastDarkTheme", "Dark Blue");
if (Theme.getTheme(nightThemeName) == null || !Theme.getTheme(nightThemeName).isDark()) {
Expand All @@ -212,7 +212,7 @@ public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
Theme.ThemeInfo themeInfo = Theme.getActiveTheme();
if (dayThemeName.equals(nightThemeName)) {
if (themeInfo.isDark() || dayThemeName.equals("Dark Blue") || dayThemeName.equals("Night")) {
dayThemeName = "Blue";
dayThemeName = "Arctic Blue";
} else {
nightThemeName = "Dark Blue";
}
Expand Down

0 comments on commit 246f03c

Please sign in to comment.