Merge branch 'hotfix-3.0.1' into develop

This commit is contained in:
Kuba Szczodrzyński 2019-09-20 22:47:54 +02:00
commit a4db208dfd
6 changed files with 26 additions and 9 deletions

View File

@ -31,6 +31,13 @@
</head> </head>
<body> <body>
<h3>Wersja 3.0.1, 2019-09-19</h3>
<ul>
<li>Librus: Poprawa błędu synchronizacji.</li>
<li>Poprawki UI związane z paskiem nawigacji.</li>
<li>Mobidziennik: Pobieranie ocen w niektórych przedmiotach.</li>
</ul>
<h3>Wersja 3.0, 2019-09-13</h3> <h3>Wersja 3.0, 2019-09-13</h3>
<ul> <ul>
<li><b>Nowy wygląd i sposób nawigacji</b> w całej aplikacji.</li> <li><b>Nowy wygląd i sposób nawigacji</b> w całej aplikacji.</li>

View File

@ -229,8 +229,8 @@ class MainActivity : AppCompatActivity() {
drawer.init(this@MainActivity) drawer.init(this@MainActivity)
SystemBarsUtil(this@MainActivity).run { SystemBarsUtil(this@MainActivity).run {
paddingByKeyboard = b.navView //paddingByKeyboard = b.navView
appFullscreen = true appFullscreen = false
statusBarColor = getColorFromAttr(context, android.R.attr.colorBackground) statusBarColor = getColorFromAttr(context, android.R.attr.colorBackground)
statusBarDarker = false statusBarDarker = false
statusBarFallbackLight = COLOR_HALF_TRANSPARENT statusBarFallbackLight = COLOR_HALF_TRANSPARENT
@ -239,6 +239,8 @@ class MainActivity : AppCompatActivity() {
b.navView.configSystemBarsUtil(this) b.navView.configSystemBarsUtil(this)
// TODO fix navlib navbar detection, orientation change issues, status bar color setting if not fullscreen
commit() commit()
} }

View File

@ -1600,6 +1600,10 @@ public class Librus implements EdziennikInterface {
r("finish", "Classrooms"); r("finish", "Classrooms");
return; return;
} }
if (data.get("Classrooms") == null) {
r("finish", "Classrooms");
return;
}
JsonArray jClassrooms = data.get("Classrooms").getAsJsonArray(); JsonArray jClassrooms = data.get("Classrooms").getAsJsonArray();
//d("Got Classrooms: "+jClassrooms.toString()); //d("Got Classrooms: "+jClassrooms.toString());
classrooms.clear(); classrooms.clear();

View File

@ -794,7 +794,7 @@ public class Mobidziennik implements EdziennikInterface {
switch (e.tagName()) { switch (e.tagName()) {
case "div": { case "div": {
//d(TAG, "Outer HTML "+e.outerHtml()); //d(TAG, "Outer HTML "+e.outerHtml());
Matcher matcher = Pattern.compile("<div.*?>\\n*\\s*(.+?)\\n*(?:<.*?)??</div>", Pattern.DOTALL).matcher(e.outerHtml()); Matcher matcher = Pattern.compile("<div.*?>\\n*\\s*(.+?)\\s*\\n*(?:<.*?)??</div>", Pattern.DOTALL).matcher(e.outerHtml());
if (matcher.find()) { if (matcher.find()) {
subjectName = matcher.group(1); subjectName = matcher.group(1);
} }
@ -1456,8 +1456,8 @@ public class Mobidziennik implements EdziennikInterface {
} }
String[] user = userStr.split("\\|", Integer.MAX_VALUE); String[] user = userStr.split("\\|", Integer.MAX_VALUE);
teachersMap.put(strToInt(user[0]), user[5]+" "+user[4]); teachersMap.put(strToInt(user[0]), user[5].trim()+" "+user[4].trim());
teacherList.add(new Teacher(profileId, strToInt(user[0]), user[4], user[5])); teacherList.add(new Teacher(profileId, strToInt(user[0]), user[4].trim(), user[5].trim()));
} }
} }
@ -1958,7 +1958,7 @@ public class Mobidziennik implements EdziennikInterface {
for(int i = 0; i < teachersMap.size(); i++) { for(int i = 0; i < teachersMap.size(); i++) {
int key = teachersMap.keyAt(i); int key = teachersMap.keyAt(i);
String str = teachersMap.valueAt(i); String str = teachersMap.valueAt(i);
if ((lesson[7] + " " + lesson[6]).equalsIgnoreCase(str)) { if ((lesson[7].trim() + " " + lesson[6].trim()).equalsIgnoreCase(str)) {
lessonObject.teacherId = key; lessonObject.teacherId = key;
} }
} }
@ -2001,7 +2001,7 @@ public class Mobidziennik implements EdziennikInterface {
for(int i = 0; i < teachersMap.size(); i++) { for(int i = 0; i < teachersMap.size(); i++) {
int key = teachersMap.keyAt(i); int key = teachersMap.keyAt(i);
String str = teachersMap.valueAt(i); String str = teachersMap.valueAt(i);
if ((lesson[7] + " " + lesson[6]).equalsIgnoreCase(str)) { if ((lesson[7].trim() + " " + lesson[6].trim()).equalsIgnoreCase(str)) {
lessonChange.teacherId = key; lessonChange.teacherId = key;
} }
} }

View File

@ -95,6 +95,8 @@
<item name="mal_color_secondary">?android:textColorSecondary</item> <item name="mal_color_secondary">?android:textColorSecondary</item>
<item name="mal_card_background">?colorSurface</item> <item name="mal_card_background">?colorSurface</item>
<item name="mal_divider_color">@color/dividerColor</item> <item name="mal_divider_color">@color/dividerColor</item>
<item name="android:statusBarColor" tools:targetApi="lollipop">?android:windowBackground</item>
</style> </style>
<style name="AppTheme.Dark" parent="NavView.Dark"> <style name="AppTheme.Dark" parent="NavView.Dark">
<item name="colorPrimary">#64b5f6</item> <item name="colorPrimary">#64b5f6</item>
@ -119,6 +121,8 @@
<item name="mal_color_secondary">@color/secondaryTextDark</item> <item name="mal_color_secondary">@color/secondaryTextDark</item>
<item name="mal_card_background">?colorSurface</item> <item name="mal_card_background">?colorSurface</item>
<item name="mal_divider_color">@color/dividerColor</item> <item name="mal_divider_color">@color/dividerColor</item>
<item name="android:statusBarColor" tools:targetApi="lollipop">?android:windowBackground</item>
</style> </style>

View File

@ -5,8 +5,8 @@ buildscript {
kotlin_version = '1.3.50' kotlin_version = '1.3.50'
release = [ release = [
versionName: "3.0", versionName: "3.0.1-rc.1",
versionCode: 3000099 versionCode: 3000110
] ]
setup = [ setup = [