Added a button to direct the user to download their schedule from Stud.IP if they have not done any modifications to their schedule; fixed a bug that would show opening hours of the currently selected canteen or crash the app whenever the info button in FetcherActivity.kt was clicked

This commit is contained in:
denizk0461
2023-05-11 21:31:41 +02:00
parent 91ffcf0637
commit a61f072055
12 changed files with 85 additions and 6 deletions
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M19.35,10.04C18.67,6.59 15.64,4 12,4 9.11,4 6.6,5.64 5.35,8.04 2.34,8.36 0,10.91 0,14c0,3.31 2.69,6 6,6h13c2.76,0 5,-2.24 5,-5 0,-2.64 -2.05,-4.78 -4.65,-4.96zM17,13l-5,5 -5,-5h3V9h4v4h3z"/>
</vector>
@@ -39,6 +39,16 @@
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
<com.google.android.material.button.MaterialButton
style="@style/Widget.Material3.Button.ElevatedButton"
android:id="@+id/button_fetch_schedule"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
app:icon="@drawable/cloud_download"
android:text="@string/event_empty_fetch_button"
android:visibility="gone"/>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_add_event"
android:layout_width="wrap_content"
+2
View File
@@ -24,6 +24,8 @@
<string name="fetch_error_webpage_snack">Du musst deinen Stundenplan öffnen!</string>
<string name="canteen_fetch_error">Mensaplan konnte nicht heruntergeladen werden!</string>
<string name="event_empty_fetch_button">Lade Deinen Stundenplan von Stud.IP herunter</string>
<!-- plurals string resource cannot be used here because Android doesn't treat 0 differently from 2 -->
<string name="toast_fetch_finished_zero">Dein Stundenplan wurde aktualisiert!</string>
<string name="toast_fetch_finished_one">Dein Stundenplan wurde aktualisiert, doch eine Veranstaltung konnte nicht heruntergeladen werden.</string>
+2
View File
@@ -25,6 +25,8 @@
<string name="fetch_error_webpage_snack">You must navigate to your schedule!</string>
<string name="canteen_fetch_error">Couldn\'t retrieve the canteen plan!</string>
<string name="event_empty_fetch_button">Download your schedule from Stud.IP</string>
<!-- plurals resource cannot be used here; view German translation for details -->
<string name="toast_fetch_finished_zero">Your schedule has been refreshed!</string>
<string name="toast_fetch_finished_one">Your schedule has been refreshed, but one item could not be saved.</string>