UFABC Library v2.0b
What's new:
Added:
- New book image placeholders (for renewal and reservation screen).
- Synchronization "safety lock" so as to avoid infinite loops due to concurrence issues (race condition).
- Alert message for custom rom devices so as to avoid synchronization issues (caused by severe safety and energy management options).
- DarkTheme support (moved to DayNight Theme).
- New iconset compatible with dark themes.
Improved:
- UI improvements.
- Main screen.
- Added new login/logoff icon.
- Removed navigation drawer.
- Navigation menu has been moved to the bottom of the main screen.
- Additional options available in navigation drawer have been moved to the title bar options menu.
- Book renewal, book reservation and recent acquisitions share the same screen (you can navigate using the bottom menu).
- Most messages are no longer displayed in a box or through toasts - their presentation methods have been migrated to customized snack messages.
- Book search box no longer exists. New searchs must be made through the title bar.
- "Reserved book" card "Delete" option changed to "Cancel".
- Added "Last updated" (last synchronization) information in Book Renewal view.
- Book details screen.
- Adjusted "Loading" message box margins.
- "Available copies" have their colours set according to the amount of books available for reservation.
- Book search screen.
- Most messages are no longer displayed in a box or through toasts - their presentation methods have been migrated to customized snack messages.
- Search filters screen.
- Adjusted margins of some elements.
- Main screen.
Fixed:
- Synchronization issues when opening the app or running it for the very first time.
UNDER THE HOOD
Added:
- Implemented MVVM pattern using Androidx's own architecture components.
- "MessageFragment" : Allows it to set a customized message, icon and an action button.
- Custom Snackbar implementation.
Improved:
- Since the whole application have been rewritten from scratch in Kotlin, the source code has become smaller and easier to understand.
- Most activities have been migrated to Fragments due to their nature, making it easier to debug and maintain their data streams, since they have access to the same ViewModel data.
- Single database to store every data related to book renewal and home cache.
- Synchronization is no longer directly delegated to AlarmManager, but to WorkManager instead (which made it possible to define execution constraints, guaranteeing the task execution).
- Utility methods no longer request "Context" as argument since the Application's context is publicly available, except in extraordinary situations.
- "configureWebView" method also sets custom WebViewClient.
- Implemented LiveData in custom WebViewClients and ViewAdapters when necessary.
- Renewal sync data is always done asynchronously.
- Upgraded Glide and Android Room version.
- Book renewal date is no longer stored as String.
- Update Android SDK to version 30 (Q).
- Replaced deprecated AsyncTask calls by Kotlin Coroutines.
- Updated source code to Kotlin 1.4.10 style.
- Replaced "activity!!" by requireActivity() where possible (same for context!!).
- Set mainLooper for every Handler instance.
- Update UFABC library's web url so as to handle HTTPS calls.
- (Security) The application no longer supports clear text trafic.
- SearchActivity no longer triggers the EditBox on internet connection issues (when "try again" button is clicked).
- Some search filters no loger causes the search to crash when search options are outdated.
- Fixed filter order in search_options_types.xml.
Removed:
- Old sync-wise Broadcast Receivers.
- Data-acquisition functions from "RenewalWebClient" class.
- Unnecessary activities.
- "Variables" class.
- Unnecessary definitions in dimens.xml.