Compare commits

...

1111 Commits

Author SHA1 Message Date
cefb0deba8 [Actions] Rename changelog output name. 2023-03-25 10:09:36 +01:00
90a151c129 [4.13.6] Update build.gradle, signing and changelog. 2023-03-24 22:27:27 +01:00
9fd9721ae7 [UI] Hide Debugging menu without dev mode. 2023-03-24 22:24:33 +01:00
ceca75ef4b [UI/Timetable] Add option to sync current week. 2023-03-24 22:16:34 +01:00
21c00bbe53 [API] Fix detecting session cookies. Remove expired cookies. 2023-03-24 22:09:31 +01:00
db00566ebf [UI/Login] Fallback reCAPTCHA to WebView activity. 2023-03-24 22:09:31 +01:00
07ab1b984f [API/Librus] Fix login. (#176) 2023-03-24 22:09:03 +01:00
8177d4aa2d [Widgets] Fix pending intents mutability. Hide timetable sync button. 2023-03-24 11:13:00 +01:00
beff1b6460 [App] Fix cookie persistence. 2023-03-24 10:56:35 +01:00
31b569b02e [4.13.5] Update build.gradle, signing and changelog. 2023-03-22 23:16:28 +01:00
8bf77817d2 [UI] Fix writing files on Android 13 and newer. 2023-03-22 23:15:45 +01:00
27b61adf1d [Actions] Fix Play release publishing workflow. 2022-12-27 12:30:03 +01:00
a0244841ad [4.13.4] Update build.gradle, signing and changelog. 2022-12-26 14:45:29 +01:00
12c0c6f2ec [UI] Always show event subject dropdown for university school. 2022-12-26 14:43:42 +01:00
aaa3b8626e [UI] Update event types for university school. 2022-12-26 14:01:25 +01:00
48c9e2dfe3 [4.13.3] Update build.gradle, signing and changelog. 2022-12-06 10:35:23 +01:00
81d4801d27 [UI] Add snowfall to CounterActivity. Enable in February as well. 2022-12-06 10:34:12 +01:00
5f8016061d [API/Vulcan] Fix wrong serializing of null in JSON causing API error. 2022-12-06 10:22:47 +01:00
5007587192 [UI/Agenda] Allow prioritizing event subject over event type. 2022-11-30 11:29:43 +01:00
dfd1083e41 [UI/Timetable] Show lesson replacing notes in all places. 2022-11-30 10:41:43 +01:00
678baf46e5 [4.13.2] Update build.gradle, signing and changelog. 2022-11-28 20:30:11 +01:00
4077fe448d [4.13.2-rc.4] Update build.gradle, signing and changelog. 2022-11-25 16:52:16 +01:00
f085e17ef7 [API/Vulcan] Once again fix ignoring 404 response on Addressbook. 2022-11-25 16:51:35 +01:00
7fd2cad46b [4.13.2-rc.3] Update build.gradle, signing and changelog. 2022-11-25 16:13:58 +01:00
93dc2ac9ab [API/Vulcan] Fix ignoring 404 response on Addressbook. 2022-11-25 16:11:50 +01:00
ac53e267fc [4.13.2-rc.2] Update build.gradle, signing and changelog. 2022-11-25 14:55:49 +01:00
86eb1a0f42 [API/Vulcan] Actually ignore 404 response on Addressbook. 2022-11-25 14:54:05 +01:00
710d82da27 [4.13.2-rc.1] Update build.gradle, signing and changelog. 2022-11-25 14:40:39 +01:00
0123f50810 [API/Vulcan] Ignore 404 response on Addressbook. 2022-11-25 14:20:22 +01:00
6d3eb65445 [API/Mobidziennik] Do not clear email field if not set. 2022-11-15 22:20:00 +01:00
a9a0630226 [4.13.1] Update build.gradle, signing and changelog. 2022-11-03 22:59:40 +01:00
ec7577f999 [App] Revert to use old devMode config key. 2022-11-03 22:29:22 +01:00
05c7c0012c [UI] Fix home cards order not saving. 2022-11-03 22:28:59 +01:00
d65c6db954 [API/Librus] Fix getting read date in messages for multiple receivers. (#154) 2022-11-03 21:53:01 +01:00
771dc437e6 [Strings] Translate home timetable card "all lessons" to English. (#152) 2022-10-30 12:45:27 +01:00
3d5d3847cc [API/Librus] Fix getting teacher name in notices. (#151) 2022-10-30 12:44:59 +01:00
18cc60a80b [4.13] Update build.gradle, signing and changelog. 2022-10-26 20:55:50 +02:00
fedde9f739 [UI/Home] Show all next lessons before school day start. 2022-10-26 20:34:48 +02:00
9fde97bef0 [App] Share Lesson and Event notes to specific team only. 2022-10-26 11:14:32 +02:00
742bd03e9e [Lab] Fix JSON page crashing because of serializing AppDb. 2022-10-26 10:31:03 +02:00
62ffc652ab [4.13-rc.5] Update build.gradle, signing and changelog. 2022-10-25 20:50:19 +02:00
bfd2e9883a [App] Refactor getting profile config. 2022-10-25 20:48:10 +02:00
00e077d01f [UI] Fix notes not showing in note list dialog. 2022-10-25 20:07:48 +02:00
c21d89cf60 [UI] Fix SettingsAboutCard having duplicate items. 2022-10-25 19:58:26 +02:00
f52cc1b197 [UI] Make shared notes for lessons use a stable ID. 2022-10-25 19:58:09 +02:00
c90ad97f55 [UI] Remove "enable shared events" setting. Reorder settings a bit. 2022-10-25 17:33:38 +02:00
845e09d875 [API/Usos] Add prefixes to classroom and building names. 2022-10-25 12:36:11 +02:00
158b69a8d3 [Lab] Fix full sync buttons. 2022-10-25 12:35:51 +02:00
9535f53563 [App] Refactor profile methods as extensions. 2022-10-25 12:19:59 +02:00
eeb3fc4621 [4.13-rc.4] Update build.gradle, signing and changelog. 2022-10-24 23:33:54 +02:00
41693a9fc8 [App] Respect user setting before notifying about updates. 2022-10-24 23:33:02 +02:00
d3599b8c89 [UI] Fix DateDropdown next week Friday not visible. 2022-10-24 23:32:21 +02:00
ffd81f8b82 [UI] Add setting to share events/notes by default. 2022-10-24 23:32:09 +02:00
2c34924052 [UI] Mark Firebase-received events as manual. Update legend icons. 2022-10-24 22:41:15 +02:00
26ad6373e6 [4.13-rc.3] Update build.gradle, signing and changelog. 2022-10-23 23:16:23 +02:00
cac8f94407 [Gradle] Update Chucker to fix Android 12 crash issue. 2022-10-23 23:16:08 +02:00
6628b97faf [API/Usos] Fix detecting term start and end date. 2022-10-23 23:11:49 +02:00
8424414317 [Login] Fix configOverrides NPE during login. 2022-10-23 23:11:20 +02:00
d8bb927703 [4.13-rc.2] Update build.gradle, signing and changelog. 2022-10-22 22:34:24 +02:00
c8e8c172a2 [App] Rework update handling. 2022-10-22 22:10:04 +02:00
0d4dee765a [Lab] Allow setting custom API key. 2022-10-22 12:56:15 +02:00
fd407b2b03 [Config] Set highest data version by default. 2022-10-22 12:31:40 +02:00
40ed5a221f [App] Fix crashes while deserializing AppData and Config. 2022-10-22 12:19:23 +02:00
5150467372 [4.13-rc.1] Update build.gradle, signing and changelog. 2022-10-22 00:02:57 +02:00
63c5720f63 [App] Move per-register settings to JSON resource. Rewrite Config to use delegates. (#150)
* [App] Add base for AppData loading.

* [UI] Fix timetable widget date navigation.

* [UI] Migrate register-specific behavior to use AppData.

* [App] Implement new delegate-based config base.

* [Config] Migrate config and profile config.

* [Config] Remove defaults from migrations.

* [App] Apply event types and config overrides from AppData.

* [Events] Change default event types for university type school.
2022-10-21 23:59:53 +02:00
6c93cd4217 [4.13-beta.3] Update build.gradle, signing and changelog. 2022-10-20 22:02:01 +02:00
649d4f619a [UI] Hide unavailable settings depending on LoginType. 2022-10-20 21:59:01 +02:00
ba10d10a10 [API] Refactor integer-based types to enum classes. (#145)
* [App] Add enum classes for common IDs.

* [App] Rename enum package names.

* [App] Migrate code to use new enums.

* [DB] Migrate loginStoreMode IDs to be unique.

* [UI] Fix minor issues after refactor.

* [API] Update sync method signature.

* [UI] Correct pop-to-home and back button drawer behavior.

* [App] Update Bundle extensions usage.

* [App] Migrate notification types to enum.

* [UI] Make Lab fragment compatible with enums.

* [API] Make EndpointTimer use FeatureType.

* [App] Migrate config & API lists to sets.
2022-10-20 21:58:10 +02:00
1450d63fcb [4.13-beta.2] Update build.gradle, signing and changelog. 2022-10-18 22:06:18 +02:00
2ec06bc39a [UI] Fix timetable lesson height. Add missing timetable settings. 2022-10-18 11:49:46 +02:00
6f12227c2e [4.13-beta.1] Update build.gradle, signing and changelog. 2022-10-17 22:56:22 +02:00
3a91f87ccd Merge pull request #142 from szkolny-eu/feature/usos
[API] Add USOS API support.
2022-10-17 22:52:08 +02:00
52a53334ca [Strings] Add USOS error descriptions. 2022-10-17 22:30:23 +02:00
3ab9602865 [API/Usos] Fix re-logging in after user action. 2022-10-17 16:06:29 +02:00
dc19043f73 [API/Usos] Implement basic error handling. 2022-10-17 12:56:07 +02:00
cf25507850 [API/Usos] Save lecturers as teachers. Add team class. 2022-10-16 18:41:37 +02:00
044cedff99 [Usos] Override lesson colors by activity type. 2022-10-16 18:13:22 +02:00
4de066bf5f [API/Usos] Implement Timetable. 2022-10-16 17:21:36 +02:00
8d174bda01 Merge remote-tracking branch 'origin/develop' into feature/usos 2022-10-16 16:54:44 +02:00
e2fd714070 [UI/Timetable] Show subject-based lesson colors. (#141)
* [UI/Timetable] Add timetable config dialog and implement UI options.

* [UI/Timetable] Fix reloading timetable after changing config.

* [UI/Timetable] Fix calculating lesson range boundaries.

* [UI/Timetable] Add coloring subject names.
2022-10-16 12:47:54 +02:00
8097e8d06d [API/Usos] Add syncing Courses and Terms. 2022-10-16 00:09:51 +02:00
93ccdbdeb7 [API/Login] Make user action handling more universal. 2022-10-15 21:24:30 +02:00
7ded400a30 [API/Usos] Implement first login. 2022-10-15 19:07:12 +02:00
2ff784066e [API/Usos] Implement OAuth authorization flow. 2022-10-14 21:44:58 +02:00
6c96875c83 [API/Login] Allow passing LoginStore params in user action requests. 2022-10-14 19:44:22 +02:00
9f3aaf6e86 [API] Move register platforms to new endpoint. 2022-10-14 14:43:40 +02:00
55369eaa8b [UI/Timetable] Add Timetable settings. (#140)
* [UI/Timetable] Add timetable config dialog and implement UI options.

* [UI/Timetable] Fix reloading timetable after changing config.

* [UI/Timetable] Fix calculating lesson range boundaries.
2022-10-14 00:25:22 +02:00
c983c16907 [UI] Request notifications permission on API >= 33. (#143)
* Added requesting notifications permission on Android 13 devices

* Move permission check to PermissionManager

* Request permission on home screen
2022-10-14 00:24:00 +02:00
c7362bce12 [API/Usos] Add base rest API class. 2022-10-13 21:27:55 +02:00
7935d0f097 [API] Pass parameters to user action required errors. 2022-10-13 11:45:17 +02:00
4b64277948 [API/Usos] Add basic USOS API structure. 2022-10-11 23:23:11 +02:00
132729bbd9 [4.12.1] Update build.gradle, signing and changelog. 2022-09-23 11:32:08 +02:00
6d36ab27d1 [UI/Login] Fix QR scanning icon not showing. 2022-09-23 11:30:23 +02:00
11fabb231f [4.12] Update build.gradle, signing and changelog. 2022-09-21 21:09:23 +02:00
6fd999f88c [UI/Widget] Fix showing lesson details dialog. 2022-09-21 21:02:09 +02:00
7711413b30 [API/Vulcan] Fix getting MessageBoxes and changing message read status. 2022-09-21 20:43:18 +02:00
cdc0c9d458 [4.11.9] Update build.gradle, signing and changelog. 2022-09-18 23:06:41 +02:00
8e5f750a80 [Manifest] Remove APK install to comply with Google Play policies. 2022-09-18 23:05:46 +02:00
f4e7e8978c [API/Vulcan] Ensure messageBoxKey before syncing addressbook. 2022-09-18 22:52:43 +02:00
96c542d6d2 [4.11.8] Update build.gradle, signing and changelog. 2022-09-17 18:02:11 +02:00
77d22b87aa [API] Move unused resources to the e-register graveyard. 2022-09-17 17:49:56 +02:00
37c68443bd [API] Remove EduDziennik implementation [*] 2022-09-17 17:39:45 +02:00
9dbb5d70e9 [App] Fix PendingIntent crashing on API 31+. 2022-09-17 17:21:13 +02:00
99afa77a63 [4.11.7] Update build.gradle, signing and changelog. 2022-09-17 16:00:38 +02:00
a5d0f4212d [UI/Login] Make Lab accessible from login page. 2022-09-17 15:00:34 +02:00
a85f935eb4 [UI/Home] Improve displaying cancelled lessons in timetable card. 2022-09-17 14:58:54 +02:00
bb44fa066c [API/Vulcan] Migrate to new MessageBox API. (#134)
* Implement fetching vulcan messages from new api

* Bump kotlin version and fix timetable card lessons size display

* Revert formatting changes

* Revert disabling message composing

* Revert MultiDex changes and dependency upgrades

* Add missing MultiDex dependency, update Google Services

* Separate MessageBoxes sync, revert API data behavior changes

* Revert migrating MessageRecipient to Kotlin

* Use loginId from MessageBox address book

* Revert using compatible HTML mode in Vulcan

* Implement message meta and read status changing

* Always set attachment lists

* Fix setting tutor role description

* Implement sending messages

* Replace millis constant with WEEK

* Revert timetable changes

* Remove unused DataVulcan properties

* Ensure UUID-format recipient IDs

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>
2022-09-17 12:31:35 +02:00
54a61c6254 [Gradle] Update dependencies, update target SDK to 33 2022-09-09 12:47:20 +02:00
ac10874bf1 [4.11.6] Update build.gradle, signing and changelog. 2022-05-27 21:09:40 +02:00
fa55b4901a [Messages/Librus] Disable text styling. (#130) 2022-05-27 18:55:24 +02:00
0f90430387 [4.11.5] Update build.gradle, signing and changelog. 2022-04-18 11:31:24 +02:00
745523c620 [UI] Fix touch events on swipe refresh pages (API 32+). (#129)
* [Hotfix] Fix touch events on swipe refresh pages (API 32)

* Add API SDK version check
2022-04-18 11:28:34 +02:00
8911ce2bc1 [4.11.4] Update build.gradle, signing and changelog. 2022-03-14 17:45:11 +01:00
2990fc5479 [Firebase] Disable notifications for past shared events. 2022-03-14 17:08:35 +01:00
48b7adb564 [UI/Grades] Group unknown subjects without specified name. 2022-03-14 17:05:16 +01:00
f8ac9e793a [4.11.3] Update build.gradle, signing and changelog. 2022-02-21 21:48:28 +01:00
148597e578 [UI/Messages] Fix sending message not showing the message fragment. 2022-02-21 21:46:16 +01:00
6c50a80b42 [UI/Timetable] Fix syncing a week not refreshing the current page. 2022-02-21 21:08:59 +01:00
1bf0679e92 [App] Disable SSLProvider in Google Play builds. 2022-02-21 20:36:17 +01:00
5b5dc5cade [Gradle] Add non-Play flavor without self-updater. 2022-02-21 20:19:29 +01:00
98a89b1ca1 [4.11.2] Update build.gradle, signing and changelog. 2022-02-05 17:47:00 +01:00
6d1e18cce2 [Strings] Update copyright dates. 2022-02-05 17:44:57 +01:00
8fe0f88be4 [Strings] Fix a typo. 2022-02-05 17:39:40 +01:00
aeed735521 [Mobidziennik] Fix syncing message lists. 2022-02-05 17:39:15 +01:00
e314fafaff [4.11.1] Update build.gradle, signing and changelog. 2022-01-14 15:23:31 +01:00
2ab0dd7546 [API/Librus] Revert getting time in teacher free days. (#124) 2021-12-16 12:23:33 +01:00
aa06868a4e [API/Librus] Fix LibrusApiTeacherFreeDays. (#123)
* [API/Librus] Remove LibrusApiTeacherFreeDayTypes

* [API/Librus] Fix LibrusApiTeacherFreeDay

* [API/Librus] LibrusApiTeacherFreeDay: Clean up values of unused variables

* [API/Librus] LibrusApiTeacherFreeDay: Remove unnecessary variables

* [API/Librus] LibrusApiTeacherFreeDay: Assign null to 'name' object
2021-12-10 21:48:11 +01:00
2b104e6463 [4.11] Update build.gradle, signing and changelog. 2021-11-01 13:05:51 +01:00
afb1863827 [Strings] Fix compilation problem. 2021-10-31 20:25:34 +01:00
d8228748e4 [4.11-rc.3] Update build.gradle, signing and changelog. 2021-10-31 20:16:12 +01:00
b0608c47c4 [Strings] Update English translation. (#117)
* Update translations

* Apply suggestions from code review

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>

* Update translations

* Update translations

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>
2021-10-31 20:15:24 +01:00
dda0d88f19 [API/Vulcan] Fix Web login with multiple student IDs. 2021-10-31 18:19:18 +01:00
a1b5560977 [API/Vulcan] Fix teachers endpoint last sync date. (#116) 2021-10-31 14:24:39 +01:00
86f5811bda [Login] Fix incorrect case mode validation. (#115) 2021-10-31 14:24:20 +01:00
3f11e75985 [Lab] Add Open Chucker button. (#114) 2021-10-31 14:23:59 +01:00
c39b5442c9 [API/Vulcan] Fix teacher list subjects retrieving. 2021-10-31 10:12:35 +01:00
3b80adf355 [4.11-rc.2] Update build.gradle, signing and changelog. 2021-10-30 22:04:13 +02:00
cae41d17b6 [Actions] Use Eclipse Temurin and gradle-build-action. 2021-10-30 22:02:59 +02:00
519d75d9d9 [API/Vulcan] Force presence of a TeamClass. 2021-10-30 21:55:47 +02:00
cb953ea8a8 [Config] Fix only notes card visible on new profiles. 2021-10-30 21:55:47 +02:00
52968cafad [Proguard] Add a rule for Note. 2021-10-30 21:55:47 +02:00
b7755dae96 [4.11-rc.1] Update build.gradle, signing and changelog. 2021-10-29 17:32:53 +02:00
113ecc0ef1 [Gradle] Fix showing correct app version on debug builds. 2021-10-29 17:32:05 +02:00
23bd9b8e05 [Strings] Update copyright dates. 2021-10-29 16:51:55 +02:00
decfd2068a [Signing] Fix incorrect version name for debug builds. 2021-10-29 16:48:53 +02:00
a88cfb8ae3 [Notes] Hide notes button in day dialog. 2021-10-29 16:48:12 +02:00
50cb0acc7d [Notes] Fix home card on click target fragment. 2021-10-29 16:48:12 +02:00
27413a9745 [Messages] Fix HTML line break decoding and encoding. 2021-10-29 16:46:32 +02:00
49a093201b [Teachers] Make the list action buttons bigger. 2021-10-29 15:39:58 +02:00
7c925cb88a [UI] Add Notes feature. (#99)
* [DB] Add Room schema export location.

* [DB] Add Note entity and migration 96.

* Add correct database schema

* [Notes] Implement basic note list UI.

* [DB] Implement Noteable in Full entities. Add note relation and filtering.

* [Notes] Make Note searchable.

* [UI] Disable onClick listeners in adapters when null.

* [UI] Implement showing note list in dialog.

* [UI] Update note dialogs UI.

* [Notes] Add note details dialog.

* [Notes] Extract note dialogs header into a separate layout.

* [Notes] Add note editor dialog.

* [Notes] Show note icons in dialogs and lists.

* [Notes] Add showing substitute text.

* [Notes] Add replacing notes icon.

* [Notes] Add sharing and receiving notes.

* [Notes] Add notes list UI fragment.

* [Notes] Implement adding notes without owner.

* [Notes] Add color names.

* [Notes] Add notes card on home screen.

* [Notes] Add notes card migration.
2021-10-28 22:35:30 +02:00
8745d7d526 [API/Szkolny] Fix user/device registration after API errors. (#111) 2021-10-28 12:11:00 +02:00
e02246f97d [UI] Add teacher list action buttons. (#105)
* Update code

TODO: Change icons color

* Change "More" icon, update teachers list

* Update code

* Update code

* Reformat code

* Apply suggestions from code review

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>

* Update code

* Update app/src/main/java/pl/szczodrzynski/edziennik/ui/teachers/TeachersListFragment.kt

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>

* Update code

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>
2021-10-24 18:29:04 +02:00
e629e03b33 [UI/Login] Implement login QR code scanning. (#100)
* Enable Vulcan QR login [WiP]

* [UI/Login] Implement login QR scanning.

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>
2021-10-23 17:23:42 +02:00
e2ad3758e0 [Config] Fix notification filter setting not loading. 2021-10-22 17:03:20 +02:00
f3e2d21b89 [UI] Refactor app dialogs. (#103)
* [UI] Add new base dialog classes.

* [UI] Migrate dialogs to the new base classes.
2021-10-22 16:57:10 +02:00
fd62653d79 [Hotfix] Fix merge problems and migration 96 crashing. 2021-10-19 17:06:26 +02:00
ca3e6f7fc9 Merge pull request #101 from szkolny-eu/feature/structure-refactor
Refactor the code structure
2021-10-19 16:26:26 +02:00
d8abac1917 Merge branch 'develop' into feature/structure-refactor
# Conflicts:
#	app/src/main/java/pl/szczodrzynski/edziennik/Extensions.kt
#	app/src/main/java/pl/szczodrzynski/edziennik/MainActivity.kt
#	app/src/main/java/pl/szczodrzynski/edziennik/data/db/entity/Teacher.kt
#	app/src/main/java/pl/szczodrzynski/edziennik/ui/teachers/TeachersAdapter.kt
#	app/src/main/java/pl/szczodrzynski/edziennik/ui/teachers/TeachersListFragment.kt
2021-10-19 13:45:29 +02:00
2807659da3 [UI] Add teachers list feature. (#94)
* Add teachers list feature

* Fix

* some fixes

* Auto stash before merge of "develop" and "origin/develop"

* Add teachers list feature

* Fix

* some fixes

* [UI] Fix updating badges crashing with expanded items.

* Add support for fetching teachers from vulcan, fix some code

* Update app/src/main/java/pl/szczodrzynski/edziennik/data/db/entity/Teacher.kt

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>

* Update some code

* Update app/src/main/java/pl/szczodrzynski/edziennik/MainActivity.kt

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>

* Update app/src/main/java/pl/szczodrzynski/edziennik/data/db/entity/Teacher.kt

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>

* Update app/src/main/java/pl/szczodrzynski/edziennik/MainActivity.kt

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>

* Update app/src/main/java/pl/szczodrzynski/edziennik/MainActivity.kt

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>

* Update app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/vulcan/data/hebe/VulcanHebeTeachers.kt

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>

* Update app/src/main/java/pl/szczodrzynski/edziennik/data/db/entity/Teacher.kt

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>

* Update app/src/main/java/pl/szczodrzynski/edziennik/data/db/migration/Migration96.kt

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>

* Update app/src/main/java/pl/szczodrzynski/edziennik/MainActivity.kt

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>

* Update app/src/main/java/pl/szczodrzynski/edziennik/MainActivity.kt

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>

* Update app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/vulcan/data/hebe/VulcanHebeTeachers.kt

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>

* Update app/src/main/java/pl/szczodrzynski/edziennik/MainActivity.kt

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>

* Update app/src/main/java/pl/szczodrzynski/edziennik/MainActivity.kt

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>

* Update app/src/main/java/pl/szczodrzynski/edziennik/MainActivity.kt

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>

* Update app/src/main/java/pl/szczodrzynski/edziennik/MainActivity.kt

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>

* Optimize code

* Fix loadTarget algorithm

* Apply suggestions from code review

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>

* Update app/src/main/java/pl/szczodrzynski/edziennik/MainActivity.kt

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>
2021-10-18 23:46:39 +02:00
7884bf4077 [Refactor] Cleanup most compilation warnings. 2021-10-17 23:02:27 +02:00
59f80c049c [Refactor] Split Extensions into separate files. 2021-10-17 22:18:00 +02:00
f1e58db151 [Refactor] Flatten .ui package. 2021-10-17 21:02:35 +02:00
74b766f18a [UI] Add text styling to manual events. (#96)
* [UI] Move text styling outside of messages module.

* [UI] Add text styling to event manual dialog.

* [UI/Events] Implement showing HTML-formatted content.

* [UI] Fix searching in styled event topic. Create HtmlMode enum.

* [UI] Add HTML Simple mode to text styling manager. Fix CharSequence replacing.

* [Events] Disable self-shared event notifications.

* [UI] Fix simple HTML mode format. Fix HTML in notifications.

* [HTML] Replace usages of Html and HtmlCompat with BetterHtml.

* [Events] Fix editing self-added events from other devices.

* [Events] Implement receiving and fix showing HTML-formatted events.

* [UI/Events] Add observing changes in event details dialog.

* [Firebase] Disable self-shared event notifications.
2021-10-16 19:37:41 +02:00
7e0f69d95d [Gradle] Migrate JCenter dependencies to JitPack. (#97)
* [Gradle] Replace JCenter-based dependencies with JitPack.

* [API] Fix Jsoup usage after dependency update.
2021-10-15 22:37:46 +02:00
fa318d4509 [UI] Update Iconics to remove the span workaround. 2021-10-13 19:23:17 +02:00
63b74a9fda [Mobidziennik] Add prefix and suffix for server name login field. 2021-10-11 20:23:57 +02:00
1a543814f4 [UI] Implement homework searching. (#93)
* [Messages] Create message type checking methods.

* [UI] Refactor messages searching to a separate module.

* [Refactor] Move dialogs.event to modules package.

* [Refactor] Move classes from modules.messages to separate packages.

* [Homework] Implement searching homework lists.

* [Homework] Fix highlighting search query in addedBy text.

* [Homework] Workaround IconicsTextView discarding span data.

* [Messages] Make attachments searchable.

* [Events] Show icons for events with attachments.

* [Homework] Workaround IconicsTextView discarding span data, again.

* [Search] Fix serialization crashes with searchable models.

* [Messages] Fix searching in HTML body.
2021-10-10 19:21:50 +02:00
50ae767fcd [Messages] Add saving messages as draft. (#92)
* [Messages/Compose] Move original message handling code to MessageManager.

* [Messages/Compose] Add draft saving dialog on back button press.

* [Messages/Compose] Implement saving messages as draft.

* [Messages/Compose] Fix missing line breaks when saving/loading HTML.

* [Messages] Fix download button icon padding.

* [Messages] Fix showing correct message read date.

* [Messages] Improve (and fix) scrolling to previous list position.

* [Messages] Fix message body trimming.

* [Messages/Compose] Add draft-related bottom sheet items.

* [Refactor] Cleanup MainActivity code.

* [Messages/Compose] Set htmlCompatible to true by default.

* [Messages/Compose] Show confirmation dialog when navigating with unsaved changes.

* [Messages] Restore message body bottom padding.

* [Messages] Fix download button icon padding, again.
2021-10-09 22:48:41 +02:00
44263ac95f [Messages] Add support for starring messages. (#86)
* [UI/Messages] Add stars to message list layout.

* [Messages] Move text styling-related code to a manager.

* [Messages] Implement starring messages. Move more code to the manager. Update UI.

* [UI] Add padding to the no data text.

* [Messages] Fix checking sent message recipient read state.

* [Messages] Add star icon padding.
2021-10-08 21:43:11 +02:00
a6aca42c8c Merge pull request #91 from szkolny-eu/hotfix/messages
[UI] Various messages fixes.
2021-10-08 16:50:09 +02:00
83daae46b8 [Messages] Fix multiplied recipients with more than one profile. 2021-10-07 11:57:23 +02:00
6611fc5843 [Messages] Disable showing 0-byte attachment sizes. 2021-10-07 11:43:54 +02:00
fe82c86c93 [Messages/Compose] Fix recipient adding dialog empty. 2021-10-07 11:28:56 +02:00
692555732d [Messages/Compose] Add text styling support. (#85)
* [UI/Messages] Add draft text styling support.

* [UI/Messages] Improve mid-word span styling. Restore subscript and superscript styles.

* [UI/Messages] Replace framework spans with custom classes on replying.

* [Messages/Compose] Move UI-related code to separate classes.

* [UI/Messages] Disable text style buttons when not in focus.

* [Messages/Compose] Disable text styling on Vulcan.

* [UI/Messages] Add hint toasts to text style toggles.

* [UI/Messages] Add button to clear text styling.

* [Messages/Compose] Fix XML formatting.
2021-10-05 20:28:29 +02:00
d59286bb05 Merge pull request #84 from szkolny-eu/feature/mobidziennik-homework-attachments
[API/Mobidziennik] Fix showing homework attachments.
2021-10-03 16:02:58 +02:00
91cfa7e945 [API/Mobidziennik] Implement syncing extra lessons. (#83) 2021-10-03 16:02:36 +02:00
2d277e80cc [UI] Restore showing message attachment size. 2021-10-02 16:15:32 +02:00
3cdca5eb33 [API/Mobidziennik] Fix showing homework attachments. 2021-10-02 16:15:02 +02:00
591abb4bb8 Merge pull request #81 from szkolny-eu/hotfix/mobidziennik-event-description
[API/Mobidziennik] Implement getting full event description.
2021-10-01 21:18:52 +02:00
0b4421c7a7 [API/Mobidziennik] Implement getting full event description. 2021-10-01 21:06:48 +02:00
325efd8b14 [Data] Refactor checking homework event type. 2021-10-01 19:46:11 +02:00
959168771b [UI] Add secret features. (#73)
* Add easter egg

* Remove big file

* Reformat code

* Remove unneded blank lines, optimize some code

* Fix small issue

* Update easter egg logic

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>
2021-10-01 18:40:44 +02:00
18c306b9ea [4.10] Update build.gradle, signing and changelog. 2021-09-22 13:55:01 +02:00
c6be1a7954 [Strings] Update copyright dates. 2021-09-22 13:52:06 +02:00
e8e9f04050 [UI] Show attendance info in timetable and lesson dialog. (#74)
* Show attendance in timetable view

* Optimize code and UX

* Update some code

* Update attendance layout

* Fix timetable view

* Bump iconics version

* Change umbrella icon

* Update app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/timetable/TimetableDayFragment.kt

* Update app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/timetable/TimetableDayFragment.kt

* Update app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/timetable/TimetableDayFragment.kt

* Update app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/timetable/TimetableDayFragment.kt

* Update lesson cell margins

* Add attendance info in lesson dialog

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>
2021-09-22 00:03:31 +02:00
3700a71c39 Merge pull request #75 from szkolny-eu/feature/availability-refactor
[API] Refactor register availability checking module.
2021-09-18 21:13:01 +02:00
60f0628f5e [Lab] Fix disabling Chucker and Dev Mode. Add new Lab options. 2021-09-18 16:37:24 +02:00
80dcd9aa69 [API] Refactor register availability checking module. 2021-09-18 16:36:17 +02:00
91b685576b [4.9] Update build.gradle, signing and changelog. 2021-09-10 23:54:09 +02:00
2e3e3dcf3c [Lab] Add button to disable devmode and Chucker toggle. (#70)
* Add option to disable/enable chucker and option to disable dev mode from lab page

* Change "chucker" to "enableChucker"

* Update App.kt
2021-09-10 23:47:46 +02:00
118f5e1794 [API/Vulcan] Fix missing attendance. (#72) 2021-09-10 23:45:29 +02:00
e902352a4b Merge pull request #69 from szkolny-eu/hotfix/message-attachments
[Messages] Fix downloading and displaying attachment on API 30+.
2021-09-10 23:44:26 +02:00
2f7fcb6dc3 [API/Mobidziennik] Fix Web timetable scrapper. 2021-09-10 17:41:39 +02:00
21ddb9d706 [Git] Update .gitignore for .idea. 2021-09-10 17:20:12 +02:00
efa63452e7 [App] Fix Apply Changes not working due to manifest changes. 2021-09-10 17:17:31 +02:00
83f84de019 [UI] Fix attachments view cut off on API 30+. 2021-09-10 17:11:21 +02:00
b9aca981e5 [App] Change app-wide storage dir to Download subfolder. 2021-09-10 16:56:52 +02:00
5913707519 [UI] Use number keyboard in the PIN field in Vulcan. (#68) 2021-09-10 06:49:17 +02:00
dd6a2c0979 [API/Mobidziennik] Add Web timetable scrapper. (#66)
* [API] Add utils for getting teacher, subject and team by name.

* [API/Mobidziennik] Add Web timetable scrapper.

* [API/Mobidziennik] Add missing Regexes.
2021-09-09 23:14:24 +02:00
9fdee6e0c7 [UI] Fix restoring header background dialog. (#65) 2021-09-09 23:14:07 +02:00
b31bf5c1ab [API/Vulcan] Fix missing timetable entries. (#67) 2021-09-09 23:13:39 +02:00
cf4906f2f4 [API/Vulcan] Fix sending messages. (#64)
* Fix sending message

* Add checking for address name/hash when sending message.

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>
2021-09-09 18:52:04 +02:00
680a5dfea3 [Mobidziennik] Fix missing linebreaks when sending messages. (#63) 2021-09-08 22:49:14 +02:00
c1062cd7ed [UI] Update drawer header background. (#62) 2021-09-08 22:49:00 +02:00
8edc581f0b [UI] Fix multiplicated day dialog in Agenda. (#61) 2021-09-08 22:48:48 +02:00
ea9d801d08 [DB] Workaround missing event types after profile archiving. (#60) 2021-09-08 22:48:35 +02:00
8f72e11d0c [UI] Center "no data" text view. (#59) 2021-09-08 22:48:21 +02:00
452271e8c0 [UI] Add list of contributors in Settings. (#15)
* Contributors item in settings

* Move contributors activity to settings package && actualize branch

* Update AndroidManifest.xml

* Getting contributors from github api

* Cleaning code

* Fetching data from szkolny api, displaying content, a lot of changes :D

* Strings

* Remove androidx legacy library

* Revert manifest changes

* Remove logging in SzkolnyApi

* Fix app name spelling

* Revert changes to dimens.xml

* Refactor contributors code

* Revert changes to dimens.xml

Again

* Revert changes to build.gradle

* Revert changes to gradle-wrapper.properties

* Revert changes to gradle.properties

* Make user name nullable

* Add caching, refactor plurals, add progress bar

* Update contributors UI

* Shorten activity name in manifest

* Remove unneeded line break

* Remove fragment_translators.xml

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>
2021-09-08 19:11:14 +02:00
7b4effe889 [UI] Fix block timetable export. (#57)
* Use MediaStore on SDK level >= 29 for timetable export

* Fix imports

* Use subdirectory in the Photos folder

* Use MediaStore for all API levels

* Remove not-null assertion

* Remove unnecessary outputStream close.

* Use File constructor for directory path

* Use File(File, String) constructor

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>
2021-09-07 22:11:29 +02:00
e2bf48d1b6 [Actions] Use JDK 11. 2021-09-02 18:27:51 +02:00
c88056ddb9 [Gradle] Update library dependencies. 2021-09-02 17:49:01 +02:00
96dbb0a057 [Gradle] Update Kotlin to v1.5.20. 2021-09-02 17:48:02 +02:00
288c80ea26 [Gradle] Update wrapper and AGP to match AS 2020.3.1. 2021-09-02 17:40:34 +02:00
5a217aca01 [4.8.2] Update build.gradle, signing and changelog. 2021-06-15 18:13:18 +02:00
4bed62aa6f [UI] Fix timetable crash when syncing (#54)
* Fix removeView

* Use removeView() instead of removeAllViews()

* Remove dayView from layout file
2021-06-11 22:06:07 +02:00
a4d604e146 [API/Librus] Update JST Client ID (#53)
@6Arin9
2021-06-11 00:05:54 +02:00
ae4405ef78 [4.8.1] Update build.gradle, signing and changelog. 2021-06-06 16:50:04 +02:00
71ca51e813 [Strings] Update copyright dates. 2021-06-06 16:47:10 +02:00
1bf07d736f [API/Librus] Update client ID (#51)
@BxOxSxS
2021-06-02 22:59:57 +02:00
909899612e Revert "[Actions] Change Firebase token to service account file."
This reverts commit 4184fbb2cd.
2021-05-26 21:51:52 +02:00
4184fbb2cd [Actions] Change Firebase token to service account file. 2021-05-26 20:44:48 +02:00
75010c0771 [4.8] Update build.gradle, signing and changelog. 2021-05-26 20:01:08 +02:00
5562498e84 Merge pull request #48 from szkolny-eu/feature/notification-long-text
[Notifications] Add long description text
2021-05-26 20:00:08 +02:00
c2d0940a80 Merge pull request #46 from szkolny-eu/hotfix/mobidziennik-message-list
[Mobidziennik] Fix sending messages returning a not found error
2021-05-26 19:59:49 +02:00
baa98f25c5 [UI] Fix easter egg prize receiving. 2021-05-26 19:09:10 +02:00
26645ee83c [DB] Add migration 93. 2021-05-26 19:00:24 +02:00
85d74bec1c [UI] Add long text for notification descriptions. 2021-05-26 19:00:09 +02:00
fd0fc652a3 Merge pull request #47 from szkolny-eu/feature/elearning-events
[Agenda] Add e-learning event type.
2021-05-26 18:52:41 +02:00
c85dac2e4d [Strings] Update copyright dates. Fix event mark as done translation. 2021-05-26 18:00:37 +02:00
c855f08f9c [API/Mobidziennik] Update messages search query to contain student name. 2021-05-26 17:46:03 +02:00
a31c68e87a [Agenda] Add e-learning event type and DB migration. 2021-04-19 14:18:28 +02:00
99021f6b3a Merge pull request #39 from szkolny-eu/feature/messages-fixes
[Messages] UI updates and fixes
2021-04-14 22:45:44 +02:00
e2b47db3fd Merge branch 'develop' into feature/messages-fixes 2021-04-14 22:42:54 +02:00
8609956ae7 [UI/Timetable] Add current time marker line. (#30) 2021-04-14 22:41:06 +02:00
e25ca930e0 Merge pull request #28 from szkolny-eu/feature/agenda-updates
[UI] Agenda updates
2021-04-14 22:40:27 +02:00
47ec1899a1 [UI/Messages] Add greeting text configuration dialog. 2021-04-14 21:08:27 +02:00
1e8fb6a9ae [UI/Messages] Restore search string after closing a message. Add message counter. 2021-04-14 20:19:04 +02:00
02eb5b7ee4 [UI/Agenda] Disable not available config options. 2021-04-14 17:03:44 +02:00
776806caef [UI/Agenda] Update DayDialog for showing event group. 2021-04-14 17:03:30 +02:00
755b846b50 [UI/Agenda] Move common code to EventManager. 2021-04-14 16:34:31 +02:00
73f3ba17de Merge branch 'develop' into feature/agenda-updates 2021-04-14 14:57:00 +02:00
07fb1e0e12 [UI] Refactor dropdown inputs code. 2021-04-14 11:59:58 +02:00
297867cbf3 [UI] Add event type colors to type dropdown. 2021-04-14 11:21:45 +02:00
db598af28a [UI] Add legend in event details dialog. 2021-04-14 10:20:00 +02:00
ec765c9070 [UI] Fix updating event dialog when editing or removing. 2021-04-14 10:16:22 +02:00
5eaa754401 [UI] Add icons for done and manual events. 2021-04-13 20:50:51 +02:00
b48b5589f4 [UI] Add eggfall. (#22)
* Add eggfall

* Add egg.png

* Add more eggs

* [Gradle] Update android-snowfall to a fork.

* [Eggfall] Add randomizing egg images.

* [UI] Restore snowfall icon. Add separate eggfall setting.

* [Eggfall] Limit eggfall to near-easter date only.

Co-authored-by: GitHub <noreply@github.com>
Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>
2021-04-12 17:18:53 +02:00
634ef16bc5 [UI] Add notification icons. (#23)
* Add notification icons

* Change color of icons

* [Notifications] Update icon colors.

* [Notifications] Update lucky number icon.

* Add icons to Notifications List Fragment

* Update notifications_list_item.xml

* Move the gravity to the LinearLayout

* add paddingLeft

* Change IconicsImageView to View.

* Rearrange XML attributes.

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>
2021-04-12 17:17:52 +02:00
ccf0bdaf05 [4.7.1] Update build.gradle, signing and changelog. 2021-04-12 14:35:43 +02:00
4647da7803 [IDE] Fix XML tags reordering when formatting. 2021-04-12 14:27:51 +02:00
613f271c4e Merge pull request #29 from szkolny-eu/hotfix/flavor-aware-availability
[App] Make registerAvailability flavor-aware.
2021-04-12 14:25:49 +02:00
8b1529f240 [App] Make registerAvailability flavor-aware. 2021-04-12 13:13:10 +02:00
3eb09033bf [Strings] Update copyright date (#26)
* Update copyright date

* Update copyright in other languages
2021-04-12 12:26:52 +02:00
12619f6bde [Agenda] Update scroll listeners code. 2021-04-12 11:50:54 +02:00
f5ceaa9afe [Agenda] Add unread badges to events and groups. 2021-04-11 22:08:33 +02:00
777ae945e0 [Agenda] Implement grouping events by type. 2021-04-10 22:26:43 +02:00
3eae8fb58b [Agenda] Add config dialog. Add compact mode. 2021-04-10 20:51:29 +02:00
b14ef5cd78 [Agenda] Limit event text to 3 lines max. 2021-04-10 18:49:24 +02:00
98bf4f3bdc [Agenda] Implement updating event list when changed. 2021-04-09 21:52:04 +02:00
2d6cf50ca7 [Agenda] Refactor agenda UI code. 2021-04-09 15:32:44 +02:00
95baf9fb9c [UI/Dialogs] Add context menu for teachers' names. (#21)
* [UI] Rearrange BetterLink code.

* [UI/Dialogs] Add context menu for teachers' names.

* [Proguard] Update rules for BetterLink reflection.

* [Proguard] Fix rules for BetterLink reflection.
2021-04-08 00:39:59 +02:00
dd0972b528 [Actions] Fix publishing in Google Play release workflow. 2021-04-07 18:42:50 +02:00
d17f6297d3 [4.7] Update build.gradle, signing and changelog. 2021-04-07 18:22:54 +02:00
3ae785a45c [Actions] Limit Google Play changelog to 500 chars. 2021-04-06 21:50:51 +02:00
dd254d4bec [Actions] Fix nightly workflow changes detection. 2021-04-06 18:20:09 +02:00
e04bd75f1f [UI/Login] Add version information in login chooser. 2021-04-06 18:17:24 +02:00
929ccb53db [Strings] Fix invalid format exception in attendance. 2021-04-05 21:59:23 +02:00
72319a4613 [API] Disable API caching for signed builds. 2021-04-05 21:52:38 +02:00
e389e6c073 [4.7-rc.2] Update build.gradle, signing and changelog. 2021-04-05 21:04:29 +02:00
cd6951dcbb [UI] Add highlighting user mentions in changelog. 2021-04-05 21:02:49 +02:00
02d60754b6 [UI] Fix changelog dialog link highlighting. 2021-04-05 20:38:51 +02:00
6884251646 [UI] Fix English translation typo. 2021-04-05 20:12:38 +02:00
582e2059d8 [App] Move buildTimestamp to manifest to improve build performance. 2021-04-05 20:00:38 +02:00
ea2974bfae [App] Improve unofficial build type info on debug. 2021-04-05 19:46:22 +02:00
b8ff649c96 [UI] Move privacy policy dialog to login chooser. 2021-04-05 19:45:57 +02:00
8661ecdafb Finish English translation (#12)
* [Feature] Espionage 0.5 speed

* [Languages] Start translating app to English

* [Languages] More English translations

* [Languages] Finish English translation

* Fix bugs in typing

* Revert "[Feature] Espionage 0.5 speed"

This reverts commit b925d3137a.

* Remove Espionage [*]

* Another typo

* Fix things that were described in review

* Fix typo

* Hour -> Time

* Update line breaks in strings file.

* Remove unneeded whitespace.

* Update English translations.

Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>
2021-04-05 19:07:25 +02:00
fe8cbc061d Merge pull request #14 from szkolny-eu/feature/readme-update
README update
2021-04-05 19:06:41 +02:00
b4459e1fd4 [Git] Add workflow badges to README. 2021-04-05 13:08:21 +02:00
fd6553871f [Git] Add banner image to README. 2021-04-05 13:00:30 +02:00
a4ca44e1ce [Git] Add README banner image. 2021-04-05 12:58:54 +02:00
e124c429d1 [Actions] Update nightly build schedule. 2021-04-05 11:25:22 +02:00
e9a2dae1e4 [Gradle] Fix moving artifacts to release folder, again. 2021-04-05 10:56:13 +02:00
8b0f3490e3 [UI/Settings] Fix hiding hiding sticks from old without devMode. 2021-04-04 22:41:20 +02:00
131606a6cf Merge pull request #13 from szkolny-eu/feature/gh-actions
Add GitHub Actions
2021-04-04 22:36:55 +02:00
cacafa205e Merge pull request #9 from Zaptyp/patch-1
Correction of spelling and punctuation errors
2021-04-04 22:36:42 +02:00
9c620de1e7 [Actions] Add nightly build workflow. 2021-04-04 21:43:00 +02:00
3e98fb967b [Actions] Add Google Play build workflow. 2021-04-04 21:42:08 +02:00
8db81478f3 [Actions] Add release build workflow. 2021-04-04 21:41:55 +02:00
8f9861bac6 [Actions] Add workflow utilities scripts. 2021-04-04 21:41:36 +02:00
5b35e3500e [Gradle] Fix moving app bundles to release folder. 2021-04-04 20:37:02 +02:00
fc4c297bef [App] Add more info to build details dialog. 2021-04-03 22:22:18 +02:00
e7cb699bcf [App] Fix unofficial build notice formatting. 2021-04-03 15:58:59 +02:00
5301b4efad [Gradle] Add moving app bundles to release folder. 2021-04-03 15:35:00 +02:00
bf595dd09c [App] Fix detecting correct remote repository name. 2021-04-03 15:13:10 +02:00
cb4b168b2a Update README.md 2021-04-02 10:12:13 +02:00
b2fcbb8289 Correction of spelling and punctuation errors
Correction of spelling and punctuation errors and improved text appearance.
2021-04-02 06:55:27 +02:00
df7982d11b [4.7-rc.1] Update build.gradle, signing and changelog. 2021-04-01 19:47:18 +02:00
7ed9bac0db Merge pull request #7 from szkolny-eu/feature/code-publish
Prepare for publishing source code
2021-04-01 19:38:20 +02:00
e6c42ccb87 [Git] Add trademarks notice. 2021-04-01 18:41:08 +02:00
73378571a2 [Git] Add README.md. 2021-04-01 18:22:39 +02:00
1cb18b554b [Git] Add LICENSE. 2021-04-01 16:30:06 +02:00
b9e7e80e11 [App] Add browsing commit file tree in Open repo button. 2021-03-31 11:23:02 +02:00
114d855c81 [App] Fix detecting signed builds. 2021-03-31 11:09:21 +02:00
1108f2eb71 [Gradle] Add configuration to store output files in release directory. 2021-03-31 10:51:59 +02:00
2a3b1422ef Merge branch 'develop' into feature/code-publish 2021-03-31 09:38:31 +02:00
5690a136f1 Merge pull request #8 from szkolny-eu/feature/code-cleanup
Code cleanup
2021-03-31 09:37:18 +02:00
4bea803220 Merge branch 'develop' into feature/code-cleanup 2021-03-31 08:52:05 +02:00
5ac1f94302 Merge pull request #6 from szkolny-eu/feature/iconics-update
Iconics update
2021-03-31 08:49:47 +02:00
62fdfe754e [UI] Add requesting storage permissions when generating timetable. 2021-03-30 23:21:32 +02:00
9ba1bf130f [UI] Migrate MaterialDateTimePicker to material-components. 2021-03-30 22:55:46 +02:00
37c0ff2ac7 [UI] Migrate MaterialDialogs to material-components. 2021-03-30 15:26:52 +02:00
6287f694f4 [UI] Replace dropdown arrow drawable with Iconics. 2021-03-30 11:11:17 +02:00
4469323fe0 [Refactor] Remove unused classes and resources. 2021-03-30 11:01:18 +02:00
ebbb9e4904 [UI] Update UI to maintain icon size consistency. 2021-03-29 22:55:56 +02:00
7e38445c98 [Gradle] Update NavLib and Iconics. 2021-03-29 22:51:48 +02:00
bf03601e83 [UI/Profile] Fix profile image icon button ripple. 2021-03-29 21:16:15 +02:00
e6dec4c6c0 [Api] Move FSLogin realms URL to GitHub sites. 2021-03-29 20:15:14 +02:00
891be2f9dd [UI/App] Add build date field to build info dialog. 2021-03-29 10:43:34 +02:00
1f6da2babe [Api] Add sending app build type and flavor headers. 2021-03-29 10:32:59 +02:00
cce47ed472 [Api] Implement caching invalid API signature response. 2021-03-29 10:21:20 +02:00
2808c66840 [UI/Login] Fix ignoring API signature errors in login chooser. 2021-03-29 09:41:50 +02:00
17351066d1 Revert "Librus 2021 Hack Working 100% Legit."
This reverts commit 9ccb6e0a24.
2021-03-29 09:31:01 +02:00
b5d5685b4c [API] Add ignoring signature errors. 2021-03-28 23:50:50 +02:00
3093850a4a [API] Add API error codes and descriptions. 2021-03-28 23:29:38 +02:00
93233f6afa [UI/App] Add Open repo button in build info dialog. 2021-03-28 22:54:18 +02:00
76838fcc41 [App] Change official version validation requirement. 2021-03-28 22:47:19 +02:00
34e44a7a36 [UI/App] Update build info dialog colors and text style. 2021-03-28 22:45:20 +02:00
5242d15ebd [UI/Settings] Add build details dialog in About card. 2021-03-28 22:37:20 +02:00
fe90fc6442 Merge branch 'develop' into feature/code-publish 2021-03-28 22:22:37 +02:00
dc08abac53 Merge pull request #4 from szkolny-eu/hotfix/android-4-fixes
Android 4.x fixes
2021-03-28 22:16:29 +02:00
f72f8228f0 Merge branch 'develop' into hotfix/android-4-fixes 2021-03-28 22:16:11 +02:00
5c87ae2711 Merge pull request #5 from szkolny-eu/feature/new-settings
Add new Settings UI
2021-03-28 22:14:16 +02:00
abcd6916b3 [App] Add remote repository validation. 2021-03-27 17:03:17 +01:00
6824960731 [App] Implement basic app validation and related UI. 2021-03-27 16:28:09 +01:00
726a37d5d6 [UI] Add build details dialog. 2021-03-27 14:33:10 +01:00
704a55d789 [UI] Update version info in Settings. 2021-03-27 14:09:38 +01:00
bf5fb5f623 [UI] Update main activity badge. 2021-03-27 14:06:30 +01:00
1af65de548 [App] Implement BuildManager. 2021-03-27 14:04:37 +01:00
06407ee439 [Gradle] Add build flavors. 2021-03-27 14:00:06 +01:00
db265fa12b [Gradle] Include Git info in build config. 2021-03-27 12:55:05 +01:00
e721261e84 [UI/Profile] Add showing profile config on long click in drawer. 2021-03-25 19:53:11 +01:00
c5eb67271e [UI] Fix debugging fragment icon missing. 2021-03-25 19:38:00 +01:00
a5f5c740c9 [UI/Licenses] Update list of open source licenses. 2021-03-25 19:37:25 +01:00
1b271bd20e [EventBus] Fix crash when opening EventManualDialog. 2021-03-25 19:02:23 +01:00
d191982da6 [UI] Remove old SettingsNewFragment. 2021-03-25 17:59:31 +01:00
6e9a0b217d [UI] Remove unused permission checking. 2021-03-25 17:57:05 +01:00
df4b6ec3e5 [UI/Profile] Fix new profile image not showing. 2021-03-25 17:51:25 +01:00
d9b91d6de8 [UI/Settings] Add requesting camera permissions in web push fragment. 2021-03-25 17:47:02 +01:00
dd6e536f88 [UI/Settings] Add requesting camera permissions to pick image. 2021-03-25 17:43:43 +01:00
a5cbee2b45 [UI/Settings] Fix profile image button icon background. 2021-03-25 17:29:43 +01:00
7a43ef4dee [App] Remove unneeded profile settings. 2021-03-25 16:45:14 +01:00
549a542879 [UI/Settings] Fix picking images from camera app. 2021-03-25 16:40:30 +01:00
0f84732f80 [UI/Settings] Add new profile config dialog. Implement choosing background images. 2021-03-25 16:40:18 +01:00
4045da7fc5 [App] Disable TLSv1.3 requirement for SSLProvider. 2021-03-25 13:19:52 +01:00
ae6af77aef [UI] Fix message buttons margin. 2021-03-25 13:13:11 +01:00
fdad2d9e1a [UI] Fix timetable lesson colors. 2021-03-25 13:06:23 +01:00
2d01a8c4d4 [UI] Fix nightly badge background tint. 2021-03-25 12:59:42 +01:00
6c4a1b54ba [Layout] Migrate marginTop/marginBottom to marginVertical. 2021-03-25 12:51:37 +01:00
37879ca07e [Layout] Migrate marginLeft/marginRight to marginHorizontal. 2021-03-25 12:48:28 +01:00
2834ab1050 [Layout] Migrate marginStart/marginEnd to marginHorizontal. 2021-03-25 12:45:07 +01:00
9ef37c46ef [Layout] Migrate paddingTop/paddingBottom to paddingVertical. 2021-03-25 11:54:52 +01:00
1364691a46 [Layout] Migrate paddingLeft/paddingRight to paddingHorizontal. 2021-03-25 11:49:22 +01:00
2933e214c6 [Layout] Migrate paddingStart/paddingEnd to paddingHorizontal. 2021-03-25 11:37:40 +01:00
a58a557fd0 [UI] Fix action switch/checkbox item padding. 2021-03-25 11:18:40 +01:00
43d71c082b [App] Fix internet and SSL connection. 2021-03-24 23:02:18 +01:00
3eb99a4bf5 [App] Change companion values to lateinit. 2021-03-24 22:41:28 +01:00
ea7b4438e8 [Refactor] Remove unused class and resources. 2021-03-23 15:50:27 +01:00
208d097986 [UI] Add new Settings fragment. 2021-03-22 21:01:04 +01:00
07561c6484 Merge pull request #3 from szkolny-eu/feature/module-refactor
Refactor Gradle dependencies and project modules
2021-03-22 19:05:30 +01:00
930ad12f5b [Git] Update .gitignore, remove ignored files. 2021-03-22 19:03:51 +01:00
b4595446a3 [Gradle] Change wrapper distribution from bin to all. 2021-03-22 17:07:17 +01:00
efcd2d80da [Gradle] Assign strict versions where required. 2021-03-21 23:47:14 +01:00
da953c9b1c [Gradle] Update CommunityMaterial to v5.8.55. 2021-03-21 23:39:51 +01:00
177ffd92f7 [Proguard] Remove unneeded rules. Move app proguard rules. 2021-03-21 22:49:43 +01:00
85379b0beb [Gradle] Remove unused dependencies. 2021-03-21 22:42:37 +01:00
cf4aa552e7 [Gradle] Update NavLib to fix multiple item selection issue. 2021-03-21 22:30:19 +01:00
b6d625a1fc [Gradle] Update most libraries. Rearrange dependencies. 2021-03-21 21:01:28 +01:00
78333e0077 [Gradle] Remove wear module. 2021-03-21 20:14:54 +01:00
ea3598bb6d [Gradle] Extract selective-dao dependency. 2021-03-21 20:11:37 +01:00
e91d99652c [Gradle] Extract szkolny-font dependency. Migrate Iconics to v5. 2021-03-21 20:11:24 +01:00
d78dad5090 [Gradle] Extract agendacalendarview dependency. 2021-03-20 23:41:59 +01:00
0615593d94 [Gradle] Extract mhttp dependency. 2021-03-20 21:34:14 +01:00
15f9db5ca6 [Gradle] Extract nachos dependency. 2021-03-20 20:11:50 +01:00
75b3485ab4 [Gradle] Extract cafebar dependency. 2021-03-20 19:26:58 +01:00
50e7bf14d4 [Gradle] Extract material-about-library dependency. 2021-03-20 18:15:21 +01:00
147f4c39e5 [4.6.1] Update build.gradle, signing and changelog. 2021-03-04 22:27:50 +01:00
9e95d05182 [Login] Add logging Firebase events on login. 2021-03-04 22:15:51 +01:00
9ccb6e0a24 Librus 2021 Hack Working 100% Legit. 2021-03-01 22:42:31 +01:00
92d7a46314 [4.6] Update build.gradle, signing and changelog. 2021-02-26 23:41:04 +01:00
7aaefa977b [Mobidziennik/Web] Add attendance migration. 2021-02-26 23:30:14 +01:00
530034d7da [Mobidziennik/Web] Fix custom attendance type symbols. 2021-02-26 23:30:14 +01:00
44647946e0 Merge pull request #2 from szkolny-eu/feature/idziennik-rip
Remove iDziennik implementation [*]
2021-02-26 23:29:11 +01:00
efd63797e4 [Mobidziennik/Web] Force trimming searched subject name. 2021-02-26 23:08:06 +01:00
74820fe67d [Mobidziennik/Web] Fix counting e-attendance. 2021-02-26 23:07:31 +01:00
e825af0ff0 [Mobidziennik/Web] Fix getting a sent message. 2021-02-26 22:46:52 +01:00
256f6c8732 [Idziennik] Remove iDziennik implementation [*] 2021-02-26 22:30:01 +01:00
22abad35cc Merge pull request #1 from szkolny-eu/feature/vulcan-hebe
Vulcan Hebe implementation
2021-02-26 20:41:51 +01:00
6a33088352 [Vulcan/Web] Fix extracting school symbol. 2021-02-26 20:37:21 +01:00
01c41645ab [Vulcan/Web] Update error descriptions. 2021-02-26 20:33:56 +01:00
54f74d2a3c [Vulcan/Hebe] Match error codes to login form fields. 2021-02-26 20:28:18 +01:00
e0688fe79b [Vulcan/Hebe] Update error descriptions. 2021-02-26 20:25:58 +01:00
36c7bb1127 [Vulcan/Hebe] Add full sync migration. 2021-02-26 20:10:52 +01:00
045205754e [Vulcan/Api] Remove Vulcan API implementation [*] 2021-02-26 19:39:56 +01:00
e34e4d6906 [Lab] Add JSON editor. 2021-02-26 17:27:17 +01:00
481af64137 [Login] Reformat LoginInfo. 2021-02-26 13:22:13 +01:00
2b3a7f6b41 [Vulcan/Web] Release web login mode as testing. 2021-02-26 13:10:50 +01:00
e3fe03c5fc [Vulcan] Update logo to the new design. 2021-02-26 13:06:48 +01:00
9740e0b7bf [Login] Fix crashing on register availability error. 2021-02-26 11:53:04 +01:00
58a26cc0c6 [Vulcan/Hebe] Fix error handling. 2021-02-26 11:52:45 +01:00
d201c0c448 [Vulcan/Hebe] Add server error code handling. 2021-02-25 22:09:00 +01:00
359432d24d [4.6-beta.1] Update build.gradle, signing and changelog. 2021-02-25 19:54:19 +01:00
edf8ec20f0 [Proguard] Add rules for FSLogin. 2021-02-25 19:53:41 +01:00
3ad9e5da1f [Vulcan/Web] Update web login to work with FSLogin Realms. 2021-02-25 19:29:06 +01:00
459bbf78b2 [Vulcan/Hebe] Add getting attachments in homework. 2021-02-24 23:45:27 +01:00
d0baf02750 [Vulcan/Hebe] Remove login method dependency. 2021-02-24 22:09:51 +01:00
a5bb7d9c6e [Lab] Add option to full sync and clear profile. 2021-02-24 21:53:59 +01:00
a939d95ea3 [Vulcan/Hebe] Add getting attachments in messages. 2021-02-24 21:18:35 +01:00
4c081c970e [Vulcan/Hebe] Exclude more endpoints from first semester sync. 2021-02-23 12:50:37 +01:00
b75ab76c2a [Vulcan/Web] Fix checking login expiry time. 2021-02-23 12:48:17 +01:00
9da6dbccb3 [Vulcan/Web] Fix registering mobile device. 2021-02-23 12:47:52 +01:00
66444ae35b [Vulcan/Web] Fix extracting permissions string. 2021-02-23 12:47:20 +01:00
3e8b3de2b7 [Vulcan/Web] Move web data to loginStore per-symbol. 2021-02-23 12:00:01 +01:00
85ac5769a1 [4.5.1-beta.1] Update build.gradle, signing and changelog. 2021-02-22 23:25:44 +01:00
93e3d5994a [Vulcan/Hebe] Restore sending date range when getting attendance. 2021-02-22 23:20:32 +01:00
0cf24c527b [Vulcan/Hebe] Fix logging tag in notices class. 2021-02-22 23:04:10 +01:00
97c5acd6ba [Vulcan/Hebe] Fix checking for current year. 2021-02-22 22:59:02 +01:00
30aeb70647 [Vulcan/Hebe] Add filtering data by current school year. 2021-02-22 22:54:13 +01:00
b599d679c4 [Vulcan/Hebe] Implement sending messages. 2021-02-22 22:43:36 +01:00
1eecd24d91 [Vulcan/Hebe] Add getting notices. 2021-02-22 22:40:28 +01:00
c698dfdb73 [Vulcan/Hebe] Add getting grade summary. 2021-02-22 21:33:42 +01:00
c7a44f5ced [Vulcan/Hebe] Implement push notifications. 2021-02-22 19:13:25 +01:00
c8ee6ff1e7 [Vulcan/Hebe] Add getting lucky number. 2021-02-22 18:49:53 +01:00
552acd4043 [Vulcan/Web] Fix web login. 2021-02-22 18:23:27 +01:00
ede101ea20 [Vulcan/Hebe] Add saving lesson topic in attendance. 2021-02-22 17:51:52 +01:00
13c2640ed5 [UI] Hide API deprecation message on other profiles. 2021-02-22 17:43:34 +01:00
dd0739fd4b Merge branch 'develop' into feature/vulcan-hebe 2021-02-22 17:36:48 +01:00
9023f13932 [Vulcan/Hebe] Add missing copyright to files. 2021-02-22 17:18:40 +01:00
f8456fb087 [Lab] Add archiver enabled checkbox. 2021-02-22 16:37:53 +01:00
9b48041cd9 [4.5] Update build.gradle, signing and changelog. 2021-02-22 00:03:52 +01:00
46cecf3474 Merge branch 'feature/vulcan-hebe' into develop 2021-02-21 23:57:25 +01:00
c27254bcad [Vulcan] Remove API login mode form. 2021-02-21 23:55:11 +01:00
80333cdea4 [Vulcan] Add API deprecation message. 2021-02-21 23:52:45 +01:00
6aee3ea420 [4.5-beta.2] Update build.gradle, signing and changelog. 2021-02-21 23:36:55 +01:00
a11a44b768 [Vulcan/Hebe] Add handling custom presence types. 2021-02-21 23:30:20 +01:00
e869107101 [Vulcan/Hebe] Add syncing both semesters during first sync. 2021-02-21 23:26:43 +01:00
5903bbe59d [Vulcan/Hebe] Fix getting attendance. 2021-02-21 23:03:06 +01:00
6c0ddd3e6d [Vulcan/Hebe] Add setting message status as read. 2021-02-21 22:55:26 +01:00
621a7ac642 [Vulcan/Hebe] Add getting attendance. 2021-02-21 22:28:54 +01:00
e86b47fb1b [Vulcan/Hebe] Add getting messages. 2021-02-21 21:50:44 +01:00
98fb7ac8c9 [Vulcan/Web] Fix Proguard rules for platform selection. 2021-02-21 19:15:53 +01:00
f49e39e858 [Vulcan/Hebe] Add getting teacher list and addressbook. 2021-02-21 19:13:47 +01:00
8fc57cd3f5 [Vulcan/Hebe] Fix getting classroom name. 2021-02-21 17:22:21 +01:00
a9eda087e0 [Extensions] Update Gson extensions to check type. 2021-02-21 17:20:13 +01:00
3f36a284ee [4.5-beta.1] Update build.gradle, signing and changelog. 2021-02-21 16:40:40 +01:00
1814fd67e1 [Strings] Update copyright date. 2021-02-21 16:39:02 +01:00
54e49af943 [Vulcan/Hebe] Add getting timetable and lesson changes. 2021-02-21 16:18:33 +01:00
d6a67a0da6 [Vulcan/Hebe] Add getting homework list. 2021-02-21 12:18:53 +01:00
28725c6400 [Vulcan/Hebe] Add getting exams. 2021-02-21 00:27:42 +01:00
4fc965d970 [Vulcan/Hebe] Add saving unit ID. 2021-02-20 23:52:40 +01:00
2aaf713d58 [Vulcan/Hebe] Add next sync and data removing in grades. 2021-02-20 23:45:27 +01:00
c7d2ac4e3e [Vulcan/Hebe] Add getting grades. 2021-02-20 23:07:23 +01:00
ae20c30c88 [Vulcan/Hebe] Fix Firebase token for registration. 2021-02-20 21:31:52 +01:00
aef3f66654 [Vulcan/Hebe] Add API list helper. Separate student list code. 2021-02-20 20:11:54 +01:00
c7abde8f11 [Vulcan/Hebe] Update login mode requirement. 2021-02-20 18:51:08 +01:00
2fcff33bd6 [Vulcan/Hebe] Add hebe API login implementation. 2021-02-19 13:37:31 +01:00
b08e4c2d3d [Gradle] Update OkHttp to 3.12.13. 2021-02-19 13:24:12 +01:00
73ff09052c [Gradle] Bump target SDK to 30. 2021-02-17 14:43:00 +01:00
9649afd43f [Gradle] Update libraries and dependencies. 2021-02-17 14:42:08 +01:00
ed3a245b51 [UI/Login] Add new easter eggs. 2020-10-18 22:14:41 +02:00
477730708f [UI/Login] Add refresh button in platform list. 2020-10-17 23:44:17 +02:00
f39d0c595d [UI/Login] Add recommended, testing and dev only badges to login modes. 2020-10-17 23:10:07 +02:00
46407f9647 [4.4.3] Update build.gradle, signing and changelog. 2020-10-16 23:54:48 +02:00
6ecb97b87e [Login/Podlasie] Add option to logout other devices. 2020-10-16 23:50:44 +02:00
ecdaaeae65 [API/Vulcan] Add KO1 routing rule. 2020-10-16 18:06:34 +02:00
a0c302b663 [App] Swap devMode with debugMode. Fix hiding sticks from old. 2020-10-16 17:18:19 +02:00
b31039ecd9 [API/Mobidziennik] Fix getting recipient list. 2020-10-16 16:57:00 +02:00
5c84086f42 [Settings/Grades] Add hiding sticks from old. 2020-10-14 22:26:47 +02:00
752cdfa8d6 Implement wear module base. 2020-09-17 18:05:17 +02:00
8e3d404352 [4.4.2] Update build.gradle, signing and changelog. 2020-09-05 19:14:11 +02:00
810cfd8092 [API] Rename response parameters to fix compatibility. 2020-09-05 19:13:37 +02:00
bd2a9524c6 [UI] Use HtmlCompat instead of Html. Fix a typo. 2020-09-05 18:47:30 +02:00
d780d5118d [Proguard] Add rules to fix API responses. 2020-09-05 18:38:53 +02:00
f1570b8eb9 [4.4.1] Update build.gradle, signing and changelog. 2020-09-04 15:44:26 +02:00
de0f29a09e [API/Mobidziennik] Fix getting attendance when a day has no lessons. 2020-09-04 00:04:23 +02:00
c0d11c91e3 [API/Mobidziennik] Fix trimming subject name in timetable. 2020-09-03 23:51:56 +02:00
22c540a3d4 [UI] Improve register unavailable dialog and card. 2020-09-03 23:50:53 +02:00
b7e35d0322 [4.4] Update build.gradle, signing and changelog. 2020-09-03 14:08:54 +02:00
7bcd6bf038 [Sync] Implement checking register availability. Improve app updates. 2020-09-03 13:39:46 +02:00
ea4591144b [4.3.1] Update build.gradle, signing and changelog. 2020-08-29 00:00:38 +02:00
7627d184a2 [API/Librus] Update client parameters. 2020-08-28 23:47:28 +02:00
076b485fda [API] Enable back sync before school year. 2020-08-28 23:27:34 +02:00
09cb97e367 [4.3] Update build.gradle, signing and changelog. 2020-08-28 15:26:42 +02:00
4e1f2ed41a [UI] Update date in about card subtext. Make gradlew executable. 2020-08-27 12:07:07 +02:00
281b6a95ef [API] Fix for syncing new profiles after archiving. 2020-08-27 00:10:19 +02:00
e40871c0d0 [UI] Update register names, again. 2020-08-26 22:15:48 +02:00
b74eeed994 [UI] Update register names. 2020-08-26 21:36:30 +02:00
ccde482364 [UI] Update register names. 2020-08-25 23:48:51 +02:00
a02033d0f3 [API] Fix archiving compatibility for older app versions. 2020-08-25 22:25:21 +02:00
6c6bc89f57 [UI] Improve archive-related UI. Add archived info home card. 2020-08-25 19:14:11 +02:00
1e3da45340 [UI] Remove unused home cards. 2020-08-25 17:02:12 +02:00
0d366adddb [UI] Implement showing archived profiles in drawer. 2020-08-25 16:01:11 +02:00
2c24eba46d [UI] Show bottom bar badge in debug versions. 2020-08-25 12:05:58 +02:00
7c6dbca986 [API] Implement basic profile archiving. 2020-08-25 10:46:50 +02:00
33a8fa2a1e [API] Fix doubled sync on API error. 2020-08-24 18:56:26 +02:00
300e2c4bc2 [API/Librus] Fix doubled sync on reCaptcha timeout. 2020-08-24 18:16:47 +02:00
f883318bd2 [Gradle] Fix compilation issues in latest Android Studio. 2020-08-24 17:42:53 +02:00
5460c1e2a0 [4.2.1] Update build.gradle, signing and changelog. 2020-05-21 23:12:25 +02:00
137c975e81 [API/Vulcan] Add getting Firebase token from server. 2020-05-21 22:07:31 +02:00
001de4a88c [Firebase] Fix getting FCM tokens and try to fix Vulcan registering. 2020-05-20 22:04:39 +02:00
5dcb3fd580 [Data] Fix setting correct time zone in ISO date parsing. 2020-05-18 12:22:21 +02:00
f13995aa5c [API/Mobidziennik] Fix lucky number extraction. 2020-05-18 11:42:58 +02:00
e23deb5ca6 [API/Podlasie] Fix security token generation. 2020-05-18 11:41:27 +02:00
d688b379a2 [4.2] Update build.gradle, signing and changelog. 2020-05-16 21:27:56 +02:00
d6a796e25e [Login] Crop Podlasie logo. Add Feedback activity, remove help icon. 2020-05-16 20:59:28 +02:00
e02d3e571d [API/Librus] Fix some more captcha errors. 2020-05-16 20:52:16 +02:00
907b75b22d [Proguard] Add rule for app login platform. 2020-05-16 20:46:54 +02:00
c3660b5f80 [Login] Change Librus logo. Disable Synergia & Vulcan e-mail login. 2020-05-16 20:44:56 +02:00
7ff10df70c [Login] Fix not showing sync fragment. 2020-05-16 20:33:37 +02:00
83e1b21ec3 [API/Podlasie] Add downloading attachments in homework. 2020-05-14 18:54:37 +02:00
deb54e4b24 [API/Podlasie] Add getting homework. 2020-05-14 12:06:52 +02:00
48873caecc [DB/Grades] Fix DataRemoveModel deleting models instead of marking as don't keep. 2020-05-14 11:43:22 +02:00
cadd1a3dbd Merge branch 'feature/prymus' into develop 2020-05-13 23:16:34 +02:00
f09f069b2c [API/Podlasie] Move event description to homework body. 2020-05-13 22:56:22 +02:00
1fb5aaed5d [UI/Podlasie] Show homework fragment in drawer. 2020-05-13 22:55:45 +02:00
65ba330d5f [API/Podlasie] Fix encoding in events topic. 2020-05-13 22:49:01 +02:00
795317f13f [API/Podlasie] Add getting teachers. 2020-05-13 22:47:05 +02:00
031cc05209 [API/Podlasie] Add getting events. 2020-05-13 22:17:50 +02:00
0ac8e1d9c1 [API/Podlasie] Add getting the lucky number. 2020-05-13 19:56:41 +02:00
4389dc9d79 [API/Podlasie] Add getting grades proposals. 2020-05-13 19:37:24 +02:00
b13257cb78 [API/Podlasie] Add getting grades. 2020-05-13 17:33:42 +02:00
fcffa2afeb [API/Podlasie] Fix saving class team, add main endpoint and getting the timetable. 2020-05-13 16:56:42 +02:00
3c2f85f263 Merge branch 'develop' into feature/prymus 2020-05-12 20:37:15 +02:00
0a2323acf3 [API/Podlasie] Implement first login and login page. 2020-05-12 20:25:45 +02:00
45c2948ed1 [Login] Fix not showing errors after one successful login. 2020-05-12 18:23:29 +02:00
f72a6103b5 Merge branch 'feature/new-login' into develop 2020-05-12 18:20:08 +02:00
9261848369 [API] Improve Lab fragment. Fix OkHttp crashing on API <21. 2020-05-12 13:41:40 +02:00
7f4e45c57c Merge branch 'develop' into feature/prymus 2020-05-11 21:06:18 +02:00
180154b684 Merge branch 'new-login' into develop 2020-05-11 20:59:38 +02:00
a4f58eb19b [API/Podlasie] Implement basic Podlasie e-register support. 2020-05-11 20:41:13 +02:00
fada483d55 [Login] Add missing e-registers. 2020-05-11 20:37:25 +02:00
3ae9ba3d61 Merge branch 'develop' into feature/new-login
# Conflicts:
#	app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/vulcan/login/VulcanLoginApi.kt
#	app/src/main/res/values/strings.xml
2020-05-11 19:06:07 +02:00
15102fe818 [Hotfix] Suppress ConvertSecondaryConstructorToPrimary in LibrusLoginApi. 2020-05-11 18:14:15 +02:00
8864bb2a5e [UI] Add new app icon and splash logo. 2020-05-11 13:42:30 +02:00
ef1cdd5b20 [API/Librus] Use Synergia message module when messages module login fails. 2020-05-10 19:44:44 +02:00
35f4f34342 [API/Vulcan] Add syncing first semester. Disable counting releases in attendance. 2020-05-09 23:01:42 +02:00
1a8134459a [API/Librus] Implement downloading messages using Synergia endpoints. 2020-05-09 20:11:09 +02:00
a6ce3a5068 [API/Librus] Make downloading attachments use Synergia. 2020-05-09 20:11:09 +02:00
328b20f78b [Fix] Increase HTTP client timeout duration. 2020-05-09 20:11:09 +02:00
771712da99 [UI/Attendance] Fix counting issues. Add attendance details dialog. 2020-05-09 19:18:18 +02:00
65e0e10db6 [4.1] Update build.gradle, signing and changelog. 2020-05-09 15:23:44 +02:00
62e0e53354 [DB] Force attendance sync in models migration. 2020-05-09 10:59:25 +02:00
a5461a488a [UI] Fix attendance type list crash. 2020-05-09 10:53:19 +02:00
192dd0c4c7 [UI] Add listing attendance by type. 2020-05-08 22:19:55 +02:00
c49755c0eb [API/Librus] Fix messages login when ReCaptcha is needed. 2020-05-08 20:46:51 +02:00
c8c758958d [API/Mobidziennik] Fix web attendance without lesson topic. 2020-05-07 15:48:16 +02:00
e068f1944f [UI] Add attendance summary page. Disable presence notifications. 2020-05-05 22:57:24 +02:00
97412a3736 [UI] Add German translation. 2020-05-05 21:46:18 +02:00
9167d53a1a [UI] Add new attendance UI module. 2020-05-04 22:47:27 +02:00
6436a17036 [API] Fix signatures for nightly versions. 2020-05-04 09:28:39 +02:00
5ab5dbe940 [UI] Show nightly version badge in main activity. 2020-05-03 13:11:04 +02:00
d68ab0d010 [Fix] Suppress i18n warning in GradesConfigDialog. 2020-05-02 23:55:20 +02:00
f70a1f5730 [DB] Fix homework added date migration. 2020-05-01 22:03:13 +02:00
85106a01d7 [API/Librus] Add online lesson URL to events description. 2020-04-30 21:41:42 +02:00
90e99e241a [UI/Home] Show textual period grades in grades card. 2020-04-29 15:23:30 +02:00
3f61ab8299 [DB] Refactor database and entities. 2020-04-29 15:14:45 +02:00
f685a4dceb [API/Vulcan] Implement Vulcan lucky numbers. 2020-04-22 20:05:36 +02:00
e8dad29e5d Merge branch 'develop' into feature/new-login 2020-04-20 19:05:05 +02:00
13a3f66db3 Merge branch 'api-v2' into develop
# Conflicts:
#	.gitignore
#	app/build.gradle
#	app/src/main/assets/pl-changelog.html
#	app/src/main/java/pl/szczodrzynski/edziennik/App.java
#	app/src/main/java/pl/szczodrzynski/edziennik/Extensions.kt
#	app/src/main/java/pl/szczodrzynski/edziennik/MainActivity.kt
#	app/src/main/java/pl/szczodrzynski/edziennik/data/api/Librus.java
#	app/src/main/java/pl/szczodrzynski/edziennik/data/api/Mobidziennik.java
#	app/src/main/java/pl/szczodrzynski/edziennik/data/api/Vulcan.java
#	app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/settings/SettingsNewFragment.java
#	app/src/main/java/pl/szczodrzynski/edziennik/utils/models/AppConfig.java
#	app/src/main/res/values-en/strings.xml
#	app/src/main/res/values/strings.xml
#	build.gradle
#	gradle/wrapper/gradle-wrapper.properties
2020-04-20 19:00:53 +02:00
dc9e6081c5 [4.0] Update build.gradle, signing and changelog. 2020-04-19 22:06:19 +02:00
26f8c03570 [UI] Show class name and school year in subname. Fix setting language. 2020-04-19 22:01:29 +02:00
97e0f36f09 [UI] Fix semester grades overlapping when scrolling. 2020-04-19 21:37:39 +02:00
27e49b10fd [API] Implement draft Vulcan Web login. 2020-04-19 19:27:27 +02:00
97dc8d12f1 [Login] Add new login user interface. 2020-04-16 11:01:53 +02:00
9b13552b73 [API/Mobidziennik] Fix downloading attachments. 2020-04-16 09:45:28 +02:00
d8559637a5 [Strings] Fix HTML tags missing in translations. 2020-04-13 22:43:26 +02:00
00a90a14dc [API] Fix downloading attachments with different name. Handle UTF encoded download names. 2020-04-07 13:57:12 +02:00
d56afb034b [API] Add Vulcan OneDrive attachment downloading. Add asking for permissions on demand. 2020-04-07 12:16:48 +02:00
0327ba37f1 [Strings] Update English translation. 2020-04-07 09:10:38 +02:00
12a54e58b5 [API] Add Vulcan message & homework attachments. Fix Mobidziennik homework attachments. 2020-04-06 22:50:00 +02:00
238250e8c9 [API/Mobidziennik] Fix homework attachment downloading. 2020-04-06 19:28:04 +02:00
041bfc6cc0 [4.0-rc.5] Update build.gradle, signing and changelog. 2020-04-05 23:59:13 +02:00
8a4866cb62 [Messages] Add new attachments view. Allow replying to deleted messages. 2020-04-05 23:56:56 +02:00
0e4d609bbf [Messages] Fix search in sent messages. Implement removing messages. 2020-04-05 23:39:32 +02:00
f07b12bd87 [Grades] Fix marking yearly grades as seen. 2020-04-05 22:04:23 +02:00
0413dbffa2 [Messages] Implement saving list position on message open. 2020-04-05 21:40:12 +02:00
c214b48409 [Messages] Add a search bar. Fix Grades not loading. 2020-04-05 20:06:35 +02:00
91a6366548 [Messages] Fix opening messages. 2020-04-04 23:14:40 +02:00
03c9932b8c [API/Edudziennik] Add getting whole homework body. 2020-04-04 22:24:15 +02:00
ea4919a25d [API/Librus] Add handling missing attachment error. 2020-04-04 22:23:31 +02:00
f98b174857 [UI] Refactor Messages fragment. 2020-04-04 21:31:14 +02:00
c0aeb0d2f3 [UI] Add showing unseen events. Add Lab fragment. 2020-04-03 20:58:51 +02:00
fcb627aac6 [Messages/Compose] Fix underlined word under the caret. 2020-04-02 15:38:16 +02:00
7f0aea29cd [API/Librus] Fix HTML to string conversion in homework. Add force download homework button in debug mode. 2020-04-02 12:56:24 +02:00
f6dcbb6594 [API/Librus] Disable Messages login when downloading homework attachment. 2020-04-02 11:19:44 +02:00
b790421693 [API/Idziennik] Correct showing proposed descriptive grades. Clarify some connection errors. 2020-04-02 11:17:47 +02:00
f5a7799924 [API/Librus] Fix getting homework without attachments. 2020-04-02 09:37:22 +02:00
b052b5bd66 [API/Librus] Add getting homework body and downloading homework attachments. 2020-04-01 22:55:20 +02:00
12d8de1def [API] Implement Idziennik homework attachment downloading. Change attachment events to sticky. 2020-04-01 21:49:05 +02:00
9303483470 [API] Implement Mobidziennik homework attachment downloading. Modify the interface a bit. Show attachments in UI. 2020-04-01 17:07:50 +02:00
f8adc86a0e [Events] Fix for duplicated events when metadata is doubled. 2020-04-01 17:04:06 +02:00
db57c258c5 [API] Add trimming whitespaces from events' titles. 2020-04-01 16:56:47 +02:00
ddb2760c16 [Events] Add Mobidziennik event attachment listing. 2020-03-31 20:04:32 +02:00
14d267a95a [API] Fix task cancelling with the notification. [UI] Add event downloading progress bar. 2020-03-31 18:20:24 +02:00
a6c4053896 [API] Add interface method to get event details. 2020-03-31 15:18:34 +02:00
949a68ec1d [Homework] Add mark as done confirmation dialog. Refactor code a bit. 2020-03-31 09:06:32 +02:00
93333a8c48 [Homework] Fix showing done homework on every profile. 2020-03-31 08:34:08 +02:00
da48c059ec [4.0-rc.4] Update build.gradle, signing and changelog. 2020-03-30 23:29:34 +02:00
ee5566d1ef [Events] Add toast hint to mark as done button. 2020-03-30 23:28:50 +02:00
b794b30346 [UI] Fix disabling pull to refresh when changing page using tab layout. 2020-03-30 23:16:35 +02:00
0db6393bb0 [Events] Add showing green check when event is done. Hide done events from homework current list. 2020-03-30 23:02:19 +02:00
fcc3c55110 [Events] Fix preserving isDone value. Improve DataRemoveModel method of keeping items. 2020-03-30 22:37:48 +02:00
328c07eaf4 [Messages] Fix Librus attachment downloading. Add option to force (re)download an attachment. 2020-03-30 19:48:56 +02:00
b004ec048e [UI] Refactor Grades, Notifications, Homework fragments to better match unified templates. 2020-03-30 18:55:28 +02:00
b9f83875a0 [Event] Add isDone attribute and marking events as done. 2020-03-30 18:19:19 +02:00
8c869d082b [UI] Add pager fragment templates. Move all templates to 'template' module. Fix swipe to refresh with pager fragments. 2020-03-30 12:50:21 +02:00
043f8210ba [UI] Add lazy loading to fragments with view pager. 2020-03-29 23:11:17 +02:00
41a79caf83 [API/Mobidziennik] Change data remove model to include only possible types. 2020-03-29 21:06:39 +02:00
0427fa6087 [Events] Add support for selective updates and upserting. 2020-03-29 18:05:56 +02:00
2f3c912dbe [Config] Disable teacher absence notifications by default. Add missing migration values. 2020-03-29 16:27:05 +02:00
219a7443c0 [4.0-rc.3] Update build.gradle, signing and changelog. 2020-03-29 15:31:49 +02:00
6deb408d80 [API/Librus] Fix attachment downloading, once again. 2020-03-29 15:30:30 +02:00
c6e1ff2164 [Events] Fix event sorting. Fix showing event teacher name. 2020-03-29 15:26:48 +02:00
bc0918a115 [API/Librus] Fix attachment downloading. 2020-03-29 15:16:35 +02:00
55ff9173be [API/Liburs] Fix unseen teacher absence metadata and add notifications for new teacher absences. 2020-03-28 17:08:36 +01:00
d4d548846f [Refactor] Refactor EventDao class. 2020-03-28 11:17:39 +01:00
ef4527f140 [Refactor] Rewrite events to Kotlin. 2020-03-27 18:51:56 +01:00
0b1e7242bb [API/Mobidziennik] Fix some errors. 2020-03-27 14:05:03 +01:00
30b6ac2a06 [4.0-rc.2] Update build.gradle, singing and changelog. 2020-03-26 20:46:03 +01:00
a7fa7cb5e4 [API/Librus] Fix a typo. 2020-03-26 20:45:46 +01:00
f3e87f9016 [API/Librus] Fix missing login data error. 2020-03-26 20:42:58 +01:00
a983af6c28 [4.0-rc.1] Update build.gradle, singing and changelog. 2020-03-26 20:40:00 +01:00
114c841f0c [API/Liburs] Fix Librus API push config endpoint. 2020-03-26 20:34:59 +01:00
e271048577 [UI] Clarify some errors. Fix deselecting the mini drawer. 2020-03-26 18:48:54 +01:00
b8c5925e82 [API/Librus] Fix attendance NPE. 2020-03-26 17:55:39 +01:00
9bda6c8869 [API/Librus] Disable push config with no premium. Disable API homework. Enable Synergia homework. 2020-03-26 16:31:11 +01:00
d1608d308c [API/Librus] Disable login with credentials in Messages. 2020-03-26 15:57:13 +01:00
b8e1e1d33a [Event/Manual] Fix dropdowns not showing any data. 2020-03-25 17:36:22 +01:00
8099a037e7 [Proguard] Update proguard rules to fix BetterLink and MiniDrawer. 2020-03-24 21:03:19 +01:00
af23c932a6 [API] Change the Cookie jar to fix most cookie problems. 2020-03-24 20:43:41 +01:00
4edabbb186 [Messages/Compose] Enable HTML messages for Idziennik. 2020-03-24 16:31:46 +01:00
37a5bea79b [Libraries] Update gradle, NavLib and Firebase. 2020-03-24 16:29:45 +01:00
40cdc7d713 [4.0-beta.14] Update build.gradle, signing and changelog. 2020-03-24 12:54:42 +01:00
49825aca48 [API/Librus] Fix message attachment downloading. 2020-03-24 12:51:49 +01:00
1d57c4e705 [Settings] Replace hardcoded Discord invite link with a redirect. 2020-03-21 16:57:01 +01:00
87ae5787ee [UX] Fix app quiting in home when back button opens drawer function active. 2020-03-20 21:39:38 +01:00
20f16c25a3 [API/Liburs] Fix getting wrong homework description in Synergia. 2020-03-20 15:47:12 +01:00
6f1ec79d9b [UX] Fix back button opens drawer function always opening the drawer. 2020-03-20 14:21:13 +01:00
18c7eea89c [API/Mobidziennik] Fix messages exception when no table found. Handle server problem maintenance error. 2020-03-19 23:25:01 +01:00
f73060aeb6 [API/Idziennik] Fix announcements error. 2020-03-19 23:04:23 +01:00
2f653b83b6 [Errors] Clarify some HTTP error explanations. 2020-03-19 23:00:39 +01:00
445dec907d [Home] Change card swipe direction to left. Add config dialog to bottom sheet. 2020-03-19 22:29:42 +01:00
927316d24b [Firebase] Disable sync by firebase when profile is excluded from auto sync. 2020-03-19 20:18:52 +01:00
3957453ed6 [UI] Fix displaying lists for correct profile in event manual dialog. 2020-03-19 20:09:35 +01:00
0296c704cb [UI] Update dialog NoDisplay theme. 2020-03-19 20:02:50 +01:00
1e7fe972de [API/Librus] Fix setting messages as read. 2020-03-19 19:49:55 +01:00
c95bc656ea [UI] Add context menus in messages and events to quickly run an action. 2020-03-19 17:55:12 +01:00
a082d95b04 [Events/Manual] Remove saving progress toasts. 2020-03-18 14:39:21 +01:00
6866dd4801 [Widgets/Timetable] Fix "no lessons" and "no timetable" texts overlapping. 2020-03-18 12:48:04 +01:00
2186da416e [Timetable] Fix displaying "no lessons" when all lessons in next 7 days are cancelled. 2020-03-18 12:45:53 +01:00
22d859fcde [UI] Set main snackbar dismiss timeout to 7 seconds. 2020-03-18 12:44:57 +01:00
39514b69b3 [API/Vulcan] Fix API url slash issue when migrating from 3.x. 2020-03-18 12:44:28 +01:00
c384736840 [Grades] Fix counting average without weight. 2020-03-17 16:06:22 +01:00
507657f273 [UI/Messages] Improve HTML lists presentation. 2020-03-17 16:05:21 +01:00
60641742ed [4.0-beta.13] Update build.gradle, signing and changelog. 2020-03-15 23:05:03 +01:00
0fc6f07986 [Homework] Fix homework list sorting. 2020-03-15 22:20:35 +01:00
1b2bdc0580 [Login] Add QR scanner to Vulcan & Librus JST login. Implement incorrect token error in Librus JST. 2020-03-15 21:46:46 +01:00
9bac239f77 [API/Librus] Add handling message not found error. Fix for duplicated errors and exceptions. 2020-03-15 20:15:10 +01:00
371acb2d2a [Events] Disable shared notification for past events. 2020-03-15 20:01:23 +01:00
454f82e139 [Events] Disable shared notification with registration disabled. Add registration enable prompt when sharing events. 2020-03-15 19:59:48 +01:00
e8da249353 [UI] Fix date dropdown selecting wrong month. Refactor event dialogs a bit. 2020-03-15 14:54:26 +01:00
c7950c53da [API/Vulcan] Fix adding unknown subject in timetable. Fix selecting correct TeamClass in timetable. 2020-03-15 12:12:00 +01:00
b5502478e4 [Dialog/EventManual] Add process dialog and fix some things. 2020-03-14 23:27:16 +01:00
4480a7e486 [API/Librus] Fix indicating parent account during first login. 2020-03-13 16:37:30 +01:00
7c7dff743b [API] Optimize App Sync a bit. 2020-03-13 16:22:43 +01:00
c568cd3f2e [Messages] Replace hardcoded message colors with brightened/darkened versions instead of white/black. 2020-03-12 18:46:16 +01:00
6ec2bc6f21 [API/Mobidziennik] Fix duplicated line breaks when getting message. 2020-03-12 13:55:02 +01:00
af3b6f3a97 [UI] Replace material date pickers with the DatePickerDialog. Add time picker to time dropdown. 2020-03-11 21:11:35 +01:00
d855118610 [Attendance] Revert changing attendance item font. 2020-03-11 19:58:56 +01:00
c9992d9fe8 [UI] Make fragments disable pull to refresh when not scrolled to the top. 2020-03-11 19:18:24 +01:00
85fe2636cc [Home] Disable pull to refresh while swiping a card. 2020-03-11 18:41:37 +01:00
35f4a31a76 [Home] Implement dismissing, adding and removing cards. Remove debug card. 2020-03-11 18:25:28 +01:00
1e494ebb70 [Feedback] Implement feedback fragment in feedback activity. 2020-03-11 17:36:41 +01:00
ed93627505 [Grades] Implement not counting selected grades to average. 2020-03-11 16:57:12 +01:00
b9b4b0036f [Grades] Update fonts and colors a bit. 2020-03-11 16:25:54 +01:00
4aa31424d6 [4.0-beta.12] Update build.gradle, signing and changelog. 2020-03-10 23:50:24 +01:00
8a825227cb [Timetable] Disable setting metadata for normal type lessons. 2020-03-10 23:45:40 +01:00
cc1b581d7e [Grades] Show custom plus/minus value annotation in GradeDetailsDialog. 2020-03-10 23:44:02 +01:00
9936d90ae2 [Dropdown/Date] Clarify strings a bit (makes sense during weekends). 2020-03-10 22:04:13 +01:00
df1a241b2b [Timetable] Fix showing "no timetable" when all nearest lessons are cancelled. Fix a crash in timetable fragment. 2020-03-10 22:01:30 +01:00
ae89b33fb7 [Events/Manual] Implement syncing timetable when no lessons for the selected date. 2020-03-10 21:49:02 +01:00
e05b483f5c [Grades] Disable counting grade value when custom values not specified. 2020-03-10 21:45:38 +01:00
715f536b23 [MainActivity] Fix some critical errors. 2020-03-10 20:57:04 +01:00
930813fb8a [Agenda] Try to fix agenda fragment not attached crashes. 2020-03-10 20:25:14 +01:00
acd5e9b998 [Timetable] Implement lazy day loading. Introduce TimetableManager class. 2020-03-10 19:27:18 +01:00
06011bf4ae [Grades] Add grades config and mark as read menu items. 2020-03-10 18:38:28 +01:00
30e15b813c [HotFix/Timers] Change timers intervals from 1s to 500ms. 2020-03-09 22:03:44 +01:00
fcd7a7f349 [Grades] Make home card use GradeView. Update GradeDetailsDialog text color. Remove deprecated items. 2020-03-09 20:39:48 +01:00
42ef40439e [Grades] Implement showing unseen badges and marking as seen. Change default "hide improved" config value. 2020-03-09 20:18:11 +01:00
098beb14fe [Timetable/Generate] Add automatic timetable sync when no timetable for the selected week. 2020-03-09 14:57:14 +01:00
0b186a754a [API/Librus] Implement behaviour grades with types. Use optional "Phrase" in text grades. 2020-03-08 20:12:37 +01:00
d00963b53d [Grades] Implement getting correct grade colors. 2020-03-08 19:39:23 +01:00
e282af0e80 [Grades] Add option to hide improved grades. Make counting average without weight configurable. 2020-03-08 17:57:44 +01:00
630361849c [Notifications] Implement Quiet hours. Add missing timetable manual strings. 2020-03-08 17:22:14 +01:00
88a1de50ca [Changelog] Update the changelog a bit. 2020-03-07 20:14:05 +01:00
d8263d0b6a [Timetable/Manual] Add database migration to implement new model. 2020-03-07 20:09:22 +01:00
611ab0f100 [Events/Manual] Create custom views for dropdowns. Simplify dialog code. Fix wrong start time saving. 2020-03-07 20:03:47 +01:00
70c307b796 [UI/Grades] Change some fonts. 2020-03-07 11:54:47 +01:00
054a233ad6 [API/Librus] Handle some more maintenance cases. 2020-03-07 09:45:45 +01:00
55268f1c43 [4.0-beta.11] Update build.gradle, signing and changelog. 2020-03-06 23:23:33 +01:00
1bec6d281c [Grades] Implement Grades editor. 2020-03-06 21:24:01 +01:00
f17a02be54 [Grades] Implement new Grades module (UI & API changes). 2020-03-06 21:09:05 +01:00
4e8fdd2225 [API/Idziennik] Fix incorrect exam type. 2020-03-06 09:25:35 +01:00
59819b4a96 [Base] Update TemplateFragment. 2020-03-04 19:09:53 +01:00
673378d8d9 [UI/Home] Improve no data text font in home cards. 2020-03-04 19:02:50 +01:00
30044d6b21 [Timetable] Ignore last lessons if cancelled and jump to the next day. 2020-03-03 18:06:55 +01:00
ee43d40680 [API/Librus] Fix device not registered error in push config. 2020-03-03 10:35:48 +01:00
1354faf8c7 [Dialog/GenerateBlockTimetable] Make better dialog layout. 2020-02-29 00:43:38 +01:00
1bfb3781ab [UI/Lists] Add missing item dividers. Try to improve attendance & grades design. 2020-02-28 23:45:46 +01:00
d7d0c6f822 [UI/Events] Add button tooltips in dialogs. Add showing weekday in home card. Add 'go to timetable' button in details dialog. 2020-02-28 23:01:38 +01:00
2bea18dc3c [Home/Events] Add new card to home fragment. Disable debug card swapping. 2020-02-28 22:38:03 +01:00
f998f2d956 [Home/Timetable] Remove "?" lessons from timetable card. 2020-02-28 21:10:03 +01:00
faa77ee5fb [Widgets/Timetable] Show crossed out classroom in lesson change if no new classroom specified. 2020-02-28 21:10:03 +01:00
88ec463284 [Gradle] Update gradle. 2020-02-28 18:33:28 +01:00
b7df71d7d9 [API/Grades] Fix proposed/final grades added date in Mobidziennik, Idziennik. 2020-02-27 23:41:41 +01:00
6a28dbd2c4 [API/Idziennik] Add changing the selected student/register (web) to get grades in some cases. 2020-02-27 23:36:41 +01:00
010f7fa1fe [API/Idziennik] Add getting lucky number from website. Fix API lucky number date. 2020-02-27 23:01:47 +01:00
209f98594f [Widgets/Timetable] Show lessons date in unified timetable widget. 2020-02-27 22:32:02 +01:00
54121c99a3 [Login/Captcha] Update captcha to fit smaller screens. Fix Librus invalid login error with captcha. 2020-02-26 21:27:03 +01:00
f6f1370edf [Debug] Add new debug mode. Include hidden Chucker in release. 2020-02-26 20:37:55 +01:00
d5863485f9 [API/Edudziennik] Fix getting attendance for the second semester. 2020-02-25 19:28:53 +01:00
afc88d316b [4.0-beta.10] Update build.gradle, signing and changelog. 2020-02-24 18:27:21 +01:00
b141279811 [API/Librus] Update Client ID. Add handling of invalid Client ID error. 2020-02-24 18:06:53 +01:00
3c8afb0609 [3.2.2] Update build.gradle and changelog. Update Librus Client ID and user agent. 2020-02-24 16:55:24 +01:00
1997ea25d5 [Gradle] Update gradle and libraries. 2020-02-24 15:29:18 +01:00
f4b49eecd4 [UI] Update theme accent colors. 2020-02-24 15:29:18 +01:00
a4493ec964 [Notifications] Add filtering notifications to show during sync. 2020-02-24 15:29:18 +01:00
af8bda9e92 [Dialog/Day] Add showing lessons count and length. 2020-02-23 23:17:28 +01:00
06d252e4ca [Notifications] Fix chucker notifications throwing an error toast. 2020-02-23 17:40:02 +01:00
67be456bb0 [Firebase/Librus] Implement Librus push registration and receiving. Fix not passing lastSync to endpoint. 2020-02-21 22:49:24 +01:00
aa5e225148 [Firebase/Vulcan] Fix not converting received string to JsonObject. 2020-02-21 22:32:50 +01:00
367f46fac8 [API/Librus] Fix captcha showing as incorrect login error. Add handling CSRF error. 2020-02-21 21:32:06 +01:00
d2f14093ec [API] Fix sync error in case of an internal, handled error. 2020-02-21 20:41:57 +01:00
43ed621879 [Errors] Fix error reporting from snackbar. 2020-02-21 20:35:18 +01:00
15c8134d13 [Firebase/Vulcan] Implement push notifications sync. 2020-02-20 21:20:51 +01:00
c2b8f71467 [4.0-beta.9] Update build.gradle, signing and changelog. 2020-02-19 23:33:30 +01:00
a6b91c3a14 [Models] Add basic error protection in Date, Time. 2020-02-19 23:04:28 +01:00
164cfbfd0d [API/Mobidziennik] Fix getting grade added dates, colors and averages. 2020-02-19 22:59:32 +01:00
0bb340e96e [API/Mobidziennik] Implement web attendance scrapper. 2020-02-19 18:58:57 +01:00
f0447dc455 [API/Mobidziennik] Fix too much clearing grades from DB. Add performance debugging to Data and ApiService. 2020-02-19 16:38:11 +01:00
626bbfa7a4 [API/Mobidziennik] Add sent messages endpoint. 2020-02-18 20:10:05 +01:00
169a900f01 [API] Implement passing last sync time to endpoints. 2020-02-18 18:58:51 +01:00
d0992eaf54 [API] Implement error handling and exception catching in Szkolny API. 2020-02-16 22:50:06 +01:00
fc21d757c3 [API/Szkolny] Restrict AppSync to run only every 24 hours (if no WebPush needed). 2020-02-16 14:30:13 +01:00
54363ee919 [UI/Timetable] Add lesson type annotation in LessonDetailsDialog. 2020-02-16 14:12:55 +01:00
fdad3b9997 [Push/Mobidziennik] Add support for behaviour grades push. 2020-02-16 13:44:45 +01:00
4ad826ebe8 [API] Implement Librus Captcha. Refactor notification constants. Update empty account error as a dialog. 2020-02-16 13:42:14 +01:00
f5e1e9fdd9 [Deprecated] Remove ServerRequest, GenericDialog. 2020-02-15 18:53:38 +01:00
82b232d0e5 [Messages/Compose] Add dropdown icon to show all recipient categories. Add before-send confirmation dialog. 2020-02-15 14:36:36 +01:00
c8c1fe5367 [4.0-beta.8] Update build.gradle and signing. 2020-02-14 22:39:13 +01:00
71128e0244 [Messages/Compose] Fix text layout jumping and scrolling off-screen when typing a long message. 2020-02-14 22:28:58 +01:00
453bcaa1f6 [Dialog/Day] Show lesson changes and teacher absences in the day dialog. 2020-02-13 23:04:29 +01:00
48898ab1d4 [Widgets] Fix profile separator text color. 2020-02-13 13:44:20 +01:00
a095520d0d [UI/Agenda] Fix subject, teacher and time display in all day events. 2020-02-13 13:33:04 +01:00
2e0c6fa6a5 [Errors] Add request body in error reporting. 2020-02-13 09:57:59 +01:00
bfbc0861df [Notifications] Disable notifications about past events & timetable changes. 2020-02-12 23:05:03 +01:00
3a500f3f28 [API/Librus] Fix student name not normalized, short name not having a trailing dot (remove legacy code). 2020-02-12 19:20:39 +01:00
df8094c39c [Dialog/LessonChanges] Add a new lesson changes dialog. 2020-02-11 16:34:40 +01:00
448fd0e884 [API/Librus] Fix marking removed announcements as read. 2020-02-10 23:53:04 +01:00
4717b4549e [Feedback] Fix crashing when null message is received. 2020-02-09 23:03:37 +01:00
57a8d72f1c [Feedback] Fix received messages not displaying for user. 2020-02-09 23:00:01 +01:00
7e57617e04 [Feedback] Update proguard rules for feedback message entity. 2020-02-09 22:03:41 +01:00
37ddd643ac [Feedback] Hide notification when feedback is open. Fix mixing messages when a thread is open. 2020-02-09 15:10:03 +01:00
bcf3fef303 [Widget/Timetable] Fix no lessons text not legible on dark background. 2020-02-09 14:34:38 +01:00
7ac4d24106 [4.0-beta.7] Update build.gradle, signing and changelog. 2020-02-08 23:16:54 +01:00
93e5bce778 [Feedback] Fix showing wrong names, improve messages filtering by device id. 2020-02-08 23:12:32 +01:00
d48beba307 [Notifications] Fix timetable notification not having subject name. 2020-02-08 23:11:59 +01:00
760338496c [Dialog/GenerateBlockTimetable] Add option for showing teacher names. 2020-02-08 01:33:34 +01:00
b52e7a3078 [Database] Remove unnecessary migration. 2020-02-04 20:59:13 +01:00
78c5b6b2a5 [Database] Fix migrations from 3.2.1 to 4.0-beta. 2020-02-04 00:31:56 +01:00
60a3c38951 [API/Vulcan] Add automatic semester date and ID updating. 2020-02-01 21:41:09 +01:00
4763033f24 [4.0-beta.6] Update build.gradle, signing and changelog. 2020-01-28 22:53:52 +01:00
3b0570d21c Revert "[Sync] Lower the priority of sync notification."
This reverts commit 1677be9e6fa30478564df94201ea0f8193d6e5b8.
2020-01-28 22:47:59 +01:00
16bf478d1a [UI/Agenda] Rewrite agenda in Kotlin and add lesson change counters. 2020-01-26 22:20:46 +01:00
5bf181b6d1 [Feedback] Implement notifications. 2020-01-26 22:03:20 +01:00
21b2e5d194 [Feedback] Add new feedback fragment and API. 2020-01-26 20:05:32 +01:00
759afcf3ca [Database/Migrations] Move migrations to files. 2020-01-25 17:23:47 +01:00
d48c7844a4 [UI/Settings] Add grades config dialog to settings fragment. 2020-01-25 13:31:40 +01:00
7d8caa8df7 [API/Librus] Use added by teacher id instead of lesson teacher in attendance. 2020-01-25 12:42:03 +01:00
62f53930da [Dialog/GradesConfig] Add grades view config dialog. 2020-01-22 23:09:07 +01:00
9a45cbb679 [UI] Add keepScreenOn in counter activity and bell sync dialog. 2020-01-22 23:08:23 +01:00
8e5a10f6d8 [API/Mobidziennik] Implement getting email for push registration. 2020-01-21 20:44:49 +01:00
10c57d2272 [Sync] Lower the priority of sync notification. 2020-01-20 23:10:35 +01:00
67d4d0f898 [Sync] Fix doubled and dead notifications during sync. 2020-01-20 21:36:53 +01:00
97e0d04842 [API] Partially revert "Include device object in each request." 2020-01-20 21:34:22 +01:00
3ba30ede92 [Sync] Fix sync notification crashing on Oreo+. 2020-01-20 20:26:52 +01:00
1035e411ab [API] Include device object in each request. 2020-01-20 19:43:14 +01:00
d5ae4b7ec9 [Home/Grades] Remove filtering grades by semester. 2020-01-20 19:30:20 +01:00
111d040cf9 [Updates] Fix no update toast not visible. 2020-01-20 19:27:59 +01:00
8cc594d170 [Widget/Timetable] Fix widget crashing with NO_LESSONS item. 2020-01-20 19:27:06 +01:00
d8a8bed68d [4.0-beta.5] Update build.gradle and signing. 2020-01-19 22:42:29 +01:00
eedbd954bd [Updates] Add toast for error while checking and for no updates. 2020-01-19 22:35:12 +01:00
0eb8366027 [Changelog] Fix changelog dialog appearance on Android N+. 2020-01-19 22:29:34 +01:00
894135104b [4.0-beta.4] Update build.gradle, signing and changelog. 2020-01-19 22:18:20 +01:00
7b2e408efc [Sync] Make sync not possible for archived profiles. Translate some error codes. 2020-01-19 22:17:57 +01:00
e4115c122e [Errors] Add reporting app version name along with the error. 2020-01-19 21:57:17 +01:00
537b16949e [Updates] Fix running update worker in Java. 2020-01-19 21:52:08 +01:00
ca60ceb2a7 [Firebase] Implement handling app updates. 2020-01-19 21:49:58 +01:00
0fad12fea5 [Updates] Change update channel to beta. 2020-01-19 21:39:28 +01:00
6cd2c23aac [Firebase] Implement handling server messages. 2020-01-19 21:31:37 +01:00
512baaa43f [Errors] Include parser error body when reporting HTTP errors. 2020-01-19 20:34:10 +01:00
d097fcc973 [API/Librus] Fix classrooms name short extraction when name contains two spaces. 2020-01-19 20:22:41 +01:00
621dbd459c [API/Vulcan] Fix marking messages as seen. 2020-01-19 20:03:25 +01:00
840ab4b0c4 [Models] Remove unused models and classes. 2020-01-19 19:30:38 +01:00
904be34a87 [Notifications] Fix showing an empty notification where the list is empty. 2020-01-19 19:19:30 +01:00
b7fc6fcc38 [Structure] Refactor App class to Kotlin. Rewrite SzkolnyTask and posting notifications. Remove dependency on AppConfig. Update libraries and gradle. 2020-01-19 19:07:27 +01:00
55c6e40d6d [DB] Convert AppDb to Kotlin. 2020-01-19 18:44:57 +01:00
4dfb015057 [Firebase/Librus] Implement basic push integration. 2020-01-19 01:17:33 +01:00
e40a0ba2bb [Strings] Add missing translations. 2020-01-18 00:44:13 +01:00
fd48f10df9 [Dialog/EventDetails] Show toast when calendar app not found instead of crashing. 2020-01-18 00:26:26 +01:00
6a54e7fef7 [Firebase] Implement Mobidziennik push service. 2020-01-16 09:27:30 +01:00
5c4d6ed140 [API/Edudziennik] Fix getting attendances. 2020-01-15 23:19:33 +01:00
9ed1be3594 [UI/DrawerProfiles] Add button for marking everything as read in every profile. 2020-01-15 22:58:22 +01:00
c5ce582678 [API/Edudziennik] Fix fix for semesters and getting grades on first login. 2020-01-15 22:26:38 +01:00
2050083bce [API/Edudziennik] Fix semesters and getting grades on first login. 2020-01-15 21:19:48 +01:00
92e6bdb562 [API/iDziennik] Fix regex getting school year in first login. 2020-01-13 22:42:30 +01:00
93e70c38b7 [Firebase] Implement base for per-register FCM tasks. 2020-01-12 21:39:06 +01:00
45b96179a5 [DB] Fix timetable migration crashing app. 2020-01-12 21:33:46 +01:00
a29a534a40 [API/Edudziennik] Fix showing notifications for presence attendances. 2020-01-12 19:45:20 +01:00
8e2297359c [Firebase] Implement new custom FCM service. 2020-01-11 19:07:25 +01:00
92ba7248ef [UI] Fix vector drawables crashing on API < 21. 2020-01-11 13:56:09 +01:00
f657d37cbd [DB/Timetable] Fix migration fixing wrong primary key columns. 2020-01-10 22:23:14 +01:00
9e312f60bf [APIService] Fix showing notification with no service running. 2020-01-10 21:34:55 +01:00
85f72b78f7 [DB/Timetable] Fix wrong primary key columns. 2020-01-10 21:33:59 +01:00
40acb67ceb [Errors] Fix Timeout error detection (SocketTimeoutException inherits from InterruptedIOException). 2020-01-10 16:44:54 +01:00
3ae8100bda [4.0-beta.3] Update build.gradle, signing and changelog. 2020-01-10 11:17:42 +01:00
1a3dc41edf [API/Idziennik] Fix error when historical grade has no color. 2020-01-10 11:14:43 +01:00
27f9b8a04e Update gradle. Add Chucker. 2020-01-10 09:30:02 +01:00
86669a491a Update .gitignore 2020-01-09 21:14:08 +01:00
b111d33b04 [Widget/Config] Disable Unified lucky number widget in config activity. 2020-01-09 21:11:43 +01:00
ea5720d1c8 [API/Edudziennik] Fix grades colors. 2020-01-08 21:12:10 +01:00
53675122c6 [Dialog/EventDetails] Add feature for saving events in calendar app. 2020-01-08 20:51:06 +01:00
4ba7997bc1 [Database] Fix bug with teacher and subject id when sharing event. 2020-01-07 21:37:58 +01:00
19c446d267 [Widgets/LuckyNumber] Implement a widget. Not knowing if it works or not, sorry. 2020-01-07 11:42:51 +01:00
1abb9ac378 [API] Fix config not reading from DB. Do not sync device if not changed. 2020-01-07 10:45:21 +01:00
f9c7492726 [Widget/Timetable] Fix past lessons (today) not displayed. 2020-01-07 10:14:43 +01:00
6ece6ca52a [UI/Counter] Add Bell Sync option in counter activity. 2020-01-07 09:48:24 +01:00
f6a8e9d2fa [4.0-beta.2] Update build.gradle, signing and changelog. 2020-01-06 22:34:46 +01:00
878de34546 [Widgets] Implement new Notifications widget. 2020-01-06 22:26:54 +01:00
7b97ef316d [Structure] Change database file structure. Rewrite converters to Kotlin. 2020-01-06 21:25:34 +01:00
aafa87c661 [Deprecated] Remove deprecated home fragment. 2020-01-06 19:17:28 +01:00
26eb2e4381 [Announcements/Liburs] Fix error on marking as read and make announcement show even when there's no Internet connection. 2020-01-06 18:24:43 +01:00
4b08ea7a89 [Dialog/GenerateBlockTimetable] Fix not showing cancelled lessons. 2020-01-06 17:47:57 +01:00
7f1f2d0039 [API/Mobidziennik] Implement Lesson Ranges. Make Cancelled lesson use old* variables. 2020-01-06 17:30:38 +01:00
0227762ddc [API/DataRemoveModel] Make DAO not remove TYPE_NO_LESSON entries. 2020-01-06 16:54:35 +01:00
ff0de8afc2 [UI/Dialogs] Remove debug toasts. Remove old Event List Dialog. 2020-01-06 16:43:31 +01:00
ddf66ef061 [UI/Dialogs] Fix "No events" text alignment. 2020-01-06 16:36:48 +01:00
52ecfba0a5 [API/Librus] Add Lessons endpoint and showing correct attendance subjects. 2020-01-06 16:27:37 +01:00
e123ff1bec [Timetable] Fix Timetable crashing with Swipe Refresh Layout and no parent. 2020-01-06 15:57:15 +01:00
45753583ee [UI/Login] Fix back button not working on Login Chooser. 2020-01-06 15:56:23 +01:00
5a77c481a2 [Extensions] Make asJsonObjectList return non-nullable JsonObjects. 2020-01-06 15:05:33 +01:00
4e796542d7 [ZXing] Try to fix QR code scanner crashing (Proguard). 2020-01-06 14:53:51 +01:00
ae42c227a8 [API/Idziennik] Add showing error on getting recipient list with no permissions. Translate some error codes. 2020-01-06 14:53:51 +01:00
fc58035bbf [UI/Timetable] Temporarily fix page scrolling issues. 2020-01-06 14:53:51 +01:00
834c4fc5f4 [UI/Attendance] Disable Mobidziennik sync reminder. 2020-01-06 14:53:51 +01:00
33fcffd2bd [API/Vulcan] Fix incorrect Attendance type. 2020-01-06 14:53:51 +01:00
18b83e2ed8 [Database] Remove deprecated Lesson and LessonChange. 2020-01-06 13:32:32 +01:00
f05b39736c [Dialogs/GenerateBlockTimetable] Add new dialog. 2020-01-06 00:11:03 +01:00
31a293c5c0 [Extensions] Add trigger extension instead of using performClick on checkboxes. 2020-01-05 23:42:35 +01:00
1e6952c86a [Utils] Fix time diff. 2020-01-05 23:39:48 +01:00
21ad38d33f [UI/Login] Fix login summary list not showing all profiles. 2020-01-05 18:29:49 +01:00
1589a05a37 [Colors] Update default profile image colors (colorFromName). 2020-01-05 18:29:49 +01:00
3f19e5d465 [Messages] Fix Messages Fragment crash. 2020-01-05 18:29:49 +01:00
5e9bd98bba [API/LuckyNumber] Always set lucky number seen metadata to true. 2020-01-05 16:39:05 +01:00
d626d98421 [API/Edudziennik] Fix error when limited access. Remove timetable not public. 2020-01-05 15:30:15 +01:00
bce74a408c [API/Edudziennik] Save cookie with semester in student data. Change semester date on semester change. 2020-01-04 23:05:36 +01:00
30c5b2d1c9 Refactor Profiles, Login Stores and Login activity (hoping it works). 2020-01-04 22:08:56 +01:00
95a150f7d8 [API/Librus] Show map value in descriptive grades. 2020-01-04 13:43:49 +01:00
45d31d2358 [Grades] Count only proposal and final grades to average with value greater than 0. 2020-01-04 13:43:17 +01:00
fb59dfc677 [API/FakeLibrus] Change http to https protocol. 2020-01-04 13:42:20 +01:00
30303f50ac [API/Edudziennik] Use new getTeacher methods. Add teamId to lessons. 2020-01-04 00:47:03 +01:00
a2fa133831 [Home/TimetableCard] Fix downloading timetable for a specific week. 2020-01-04 00:25:56 +01:00
d735dcea05 [API/Mobidziennik] Use toIntOrNull instead of try catch in the lucky number extractor. 2020-01-04 00:15:56 +01:00
a96fcabba5 [API/Edudziennik] Fix getting grades with null value. 2020-01-03 23:51:36 +01:00
21fd59c196 [API/Edudziennik] Save and use semester cookie instead of currentSemester in profile. 2020-01-03 23:48:50 +01:00
15f126416f [API/Librus] Use normal grade categories in text grades. 2020-01-03 15:23:37 +01:00
7f1f9f81a6 [API/Librus] Remove text grade categories from features. 2020-01-02 21:29:27 +01:00
de6b77baba [4.0-beta.1] It's here. Finally. 2020-01-02 20:05:14 +01:00
c8e3a3d258 [Messages/Compose] Change reply greeting text. Remove debugging toasts. 2020-01-02 20:03:52 +01:00
52ef24ae7b [Messages/Compose] Fix when adding duplicated recipient. 2020-01-02 20:02:48 +01:00
1553173300 [Messages/Compose] Fix deselecting recipients in dialog. 2020-01-02 19:57:48 +01:00
f5b2c24ee3 [Messages/Compose] Fix browsing Teacher category in dialog. 2020-01-02 19:28:51 +01:00
2ddbc6bbac [Gradle] Move java-json to app/libs. 2020-01-02 18:49:43 +01:00
eae7189981 [Messages] Add sending messages and fix stuff. 2020-01-02 18:27:58 +01:00
f292b3637d [API/Librus] Fix syncing past homework. 2020-01-02 15:38:43 +01:00
aff0b361a2 It's the new year bruh. 2020-01-02 09:02:15 +01:00
9f78b86c57 [API/Edudziennik] Add getting notes. 2020-01-01 19:41:52 +01:00
4950627850 [API/Librus] Fix null in homework description. 2020-01-01 18:58:29 +01:00
5265f3eb6a [API/Edudziennik] Add getting events. 2020-01-01 18:47:09 +01:00
3cca5e8e9a [DataRemoveModel/Events] Add removing future except list of types. 2020-01-01 18:46:43 +01:00
e9ca109c57 [Errors] Rewrite crash activity in Kotlin and add error reporting. 2019-12-31 18:48:06 +01:00
344da53888 [Errors] Add reporting the error ID. 2019-12-31 14:28:37 +01:00
62ae3c4c4b [Edudziennik] Add to changelog. Update Edudziennik feature list. 2019-12-31 12:45:57 +01:00
6f95eb3c3f [Errors] Update error details dialog, implement error reporting. 2019-12-31 12:45:57 +01:00
f350a86946 [UI/Changelog] Add new changelog dialog. Update for v4.0-beta.1 2019-12-31 12:45:57 +01:00
868e529e62 [API/Edudziennik] Add saving teachers login ids. 2019-12-31 12:23:38 +01:00
62d82c88a1 [API/Szkolny] Fix respecting registration status of profile in App Sync. 2019-12-30 22:44:45 +01:00
a86e995113 [API/Librus] Fix announcement mark as read request and fix observer in announcements. 2019-12-29 20:40:54 +01:00
5e2c7e89ab [Hotfix] Fix crashing in grades subject adapter. 2019-12-29 20:22:48 +01:00
4a38906194 [API/Edudziennik] Add getting homework. 2019-12-29 19:41:03 +01:00
cc3e6d97dd [Strings/Sync] Change all "Pobieram…" to "Pobieranie…" 2019-12-29 19:01:12 +01:00
90d6fb56d1 [API/Librus] Add rest of the grade types and categories... 2019-12-29 18:51:47 +01:00
9b5cf3f636 [API/Librus] Add getting descriptive grades and its categories. 2019-12-29 17:48:54 +01:00
3723abbbbb [API/Idziennik] Add getting attachments. 2019-12-28 17:02:43 +01:00
a626427788 [API/Idziennik] Add getting message. 2019-12-28 14:09:32 +01:00
35d88f8c78 [API/Librus] Add marking announcements as read. 2019-12-27 20:10:42 +01:00
c65872b29b [Errors] Add showing errors details. 2019-12-26 23:44:24 +01:00
e472d34f4d [Announcements] Add idString column and add getting attachments in Edudziennik. 2019-12-26 22:59:43 +01:00
1257596104 [API/Edudziennik] Change grade categories and descriptions and change back lucky number sync frequency to always. 2019-12-26 00:43:03 +01:00
5dd6519d27 [Attendance] Change TYPE_FREE to TYPE_DAY_FREE. 2019-12-26 00:10:14 +01:00
e607577407 [Attendance] Add free attendance type. 2019-12-25 23:51:52 +01:00
ade12e729f [Grades] Change point grade types names. 2019-12-25 22:50:21 +01:00
eee83ebb94 [API/Edudziennik] Fix getting grades and add support for point grades. 2019-12-25 22:46:29 +01:00
39ff47e866 [API/Edudziennik] Fix downloading timetable out of the school year. 2019-12-25 22:19:02 +01:00
6c81a506e9 [API/Edudziennik] Add error reasons and add grade description. 2019-12-25 13:15:03 +01:00
a24620de31 [API/Edudziennik] Add limited access basic handling and add setting next sync for lucky number. 2019-12-25 02:38:54 +01:00
70de47408a [API/Edudziennik] Add getting teachers and *change endpoint IDs.* 2019-12-25 02:17:20 +01:00
04103d1c84 [API/Edudziennik] Move getting grades to other endpoint and add getting subjects. 2019-12-25 01:49:37 +01:00
d20102c3bd [3.9.17-dev] Update build.gradle and signing 2019-12-25 00:02:51 +01:00
f165ee32e5 [API/Edudziennik] Fix getting teacher in timetable and fix getting team name. 2019-12-24 15:52:15 +01:00
60ad2e81f3 [API/Edudziennik] Add getting attendance. 2019-12-24 15:39:22 +01:00
5ca8b642da [API/Edudziennik] Add getting event type in events. 2019-12-24 14:44:01 +01:00
f40cd7f26c [API/Edudziennik] Add userCode 2019-12-24 14:04:46 +01:00
e04b519e9b [API/Edudziennik] Move getting grades and info to new endpoints. 2019-12-24 13:41:06 +01:00
658e59bed6 [API/Edudziennik] Add getting teams and exams. 2019-12-24 13:26:06 +01:00
cb5eb19abc [API/Timetable] Move timetableNotPublic to student data. 2019-12-24 12:01:09 +01:00
d336531ca8 [API/Edudziennik] Use Regexes instead of Jsoup in first login. 2019-12-23 23:20:45 +01:00
30ee71f4e3 [API/Edudziennik] Add getting grades and add basic error handling. 2019-12-23 22:56:23 +01:00
844d5b33bc [API/Edudziennik] Fix getting students on first login. 2019-12-23 20:31:44 +01:00
e3741f1c75 [API/Edudziennik] Add getting timetable. 2019-12-23 18:34:39 +01:00
21a6e4d8c6 [API/Edudziennik] Add start and lucky number endpoint. 2019-12-23 16:33:20 +01:00
ec14ba76c9 [Edudziennik] Add first login. 2019-12-23 15:15:38 +01:00
90e7b1e9c7 [Edudziennik] Implement base of the new e-register. 2019-12-23 00:46:06 +01:00
a09d943344 [API/IDziennik] Fix final grade names. 2019-12-22 23:42:03 +01:00
52ac40c826 [API/Grades] Add data remove model for grades. 2019-12-22 23:21:03 +01:00
8f8eb64364 [APIv2/Librus] Show starting points only when greater than 0. 2019-12-22 22:22:46 +01:00
fe40ab0ab4 [Home/LuckyNumberCard] Fix crashing because of invalid argument type. 2019-12-22 22:13:03 +01:00
5991ef820f [Home/TimetableCard] Add counting in seconds. 2019-12-22 21:31:12 +01:00
d67c2a90b1 [Hotfix] Fix null cast exception in timetable day fragment. 2019-12-22 20:44:41 +01:00
e85d6fbc3b [UI/Counter] Add new counter activity. 2019-12-22 20:05:01 +01:00
62a9604bd2 [UI/Home] Debug card is bacc. 2019-12-22 15:36:57 +01:00
0aae2174c1 [UI/Timetable] Update date selection algorithm and no lessons info. Show empty timetable info in widget. 2019-12-21 22:56:54 +01:00
b66bd6fec9 [Dialog/BellSync] Add showing info when there are no lessons. 2019-12-21 21:19:29 +01:00
b399a3f5ad [UI/Timetable] Handle no timetable or no lessons in Home card. 2019-12-21 17:39:17 +01:00
1f5927eec0 [Manifest] Set the default theme to dark. 2019-12-20 23:49:47 +01:00
2d838e7003 [Dialog/BellSync] Add coroutine timer and make some small changes. 2019-12-20 23:48:47 +01:00
f242c30476 [API/Events] Update Event Manual dialog sharing. 2019-12-20 22:00:55 +01:00
2cf204ff79 [Dialog/BellSync] Implement bell sync dialog. 2019-12-20 00:40:14 +01:00
38fc9e97bb [3.9.16-dev] Update build.gradle and signing 2019-12-19 22:33:41 +01:00
3e4accb82c [UI/WebPush] Implement Web Push pairing fragment and API. Add more templates. 2019-12-19 21:57:01 +01:00
b905283b61 [UI/Dialogs] Disable timetable fragment refreshing on event removing. 2019-12-18 23:55:15 +01:00
c7e5df5c91 [UI/Dialogs] Remove old Manual Event Dialog. Disable timetable fragment refreshing on event save. Add new Event Details Dialog. 2019-12-18 23:50:24 +01:00
99006d7923 [UI/Dialogs] Update Lesson Details dialog when no classroom/teacher. Fix double events when metadata duplicated for different type. 2019-12-18 22:06:43 +01:00
16320b4486 [UI/Events] Update Day Dialog. Add Event List Adapter to Timetable Lesson Dialog. 2019-12-18 20:07:38 +01:00
d70b0c0c3f [UI] Implement new Event Adapter and Day Dialog (partially). 2019-12-16 22:26:00 +01:00
41cebc554f [UI] 'Cause it's winter. 2019-12-15 21:27:50 +01:00
6a2c863fcc [3.2.1] Update build.gradle and changelog 2019-12-15 19:05:22 +01:00
92e0fc2847 [Sync] Fix showing notifications. Implement notifications web push. 2019-12-15 16:43:24 +01:00
9978a11c52 [Proguard] Update Proguard rules for Retrofit and JNI code. 2019-12-15 15:59:46 +01:00
cf77623e9c [UI/Agenda] Add FAB to add events and make the dialog open with the selected date. 2019-12-15 00:42:28 +01:00
7ce4acc687 [Structure] Move API to data package. 2019-12-15 00:28:31 +01:00
ffbac126bd [3.9.15-dev] Implement C++ Native password signer library. 2019-12-14 22:56:56 +01:00
0f11b02047 [3.9.14-dev] 2019-12-14 17:48:16 +01:00
b8cf731dd0 [Dialog/EventManual] Unshare using eventObject instead of editingEvent. 2019-12-14 17:31:34 +01:00
ad5afac174 [Login/Librus] Implement Librus JST login form. 2019-12-14 17:21:29 +01:00
cf69273de1 [APIv1/Mobidziennik] Add API key. 2019-12-14 14:17:37 +01:00
13279a915d [API/Mobidziennik] Add API key and fix tasks not finishing 2019-12-14 14:06:43 +01:00
3defe2d343 [API] Remove deprecated server sync. 2019-12-14 01:03:12 +01:00
2c86414e74 [API/Szkolny] Change api structure, make SzkolnyTask and add sharing events. 2019-12-14 01:02:28 +01:00
9e4f816009 [Event] Update sharing dialog 2019-12-13 22:07:42 +01:00
b48afde7f1 [Dialog/EventManual] Add editing and removing events and fix a few bugs. 2019-12-10 23:23:26 +01:00
13cdaadcf7 [Dialog/EventManual] Add default type support and remove old dialog from the agenda fragment. 2019-12-10 22:31:33 +01:00
44fc1c4532 [Dialogs] Remove deprecated dialogs. 2019-12-09 17:58:56 +01:00
ddb1ecaa99 [UI/Settings] Add setting for showing drawer on back pressed. 2019-12-09 17:24:41 +01:00
50ada5f95b [APIv2/Szkolny] Move profiles parameter to getEvents function 2019-12-09 16:37:21 +01:00
40ba9e8434 [APIv2/Szkolny] Add Szkolny API and add getting shared events. 2019-12-09 16:35:37 +01:00
d6f9b81de6 [API] Add Server Sync Task 2019-12-08 19:12:38 +01:00
b085d94fea [APIv2/Librus] Fix announcements duplicate ids (migrate from crc16 to crc32) 2019-12-08 15:00:38 +01:00
90343e1e39 [UI/Messages] Fix message body text color in messages fragment 2019-12-08 00:51:42 +01:00
883d8f31c4 [Database/Announcements] Make announcements sort by start date. 2019-12-08 00:28:46 +01:00
2e18c5a668 [APIv2/Librus] Add behaviour grade comments, change features names and fix semester start points 2019-12-07 23:57:49 +01:00
c1ca104021 [UI/Announcements] Make better announcements look. 2019-12-07 20:46:00 +01:00
e7db4e9326 [Gradle] Update gradle wrapper. 2019-12-06 20:31:45 +01:00
203a42eb1b [UI/Messages] Fix colors in messages body. 2019-12-04 23:59:27 +01:00
c83f20983b [APIv2/Librus] Fix replacing weird XML tags in messages. 2019-12-04 23:59:09 +01:00
25f504cadf [APIv2/Librus] Add getting behaviour grades and its categories. 2019-12-03 23:44:55 +01:00
07ce718e3c [Widget] Fix showing all-day event on every lesson. 2019-12-03 19:42:25 +01:00
83264b5973 [Config] Fix reading backgrounds value. 2019-12-03 19:39:48 +01:00
1acf1547d5 [3.9.13-dev] 2019-12-02 22:24:55 +01:00
5d3de35c10 [UI/Timetable] Fix non-null cast exception. 2019-12-02 22:20:53 +01:00
8f8d613f6e [UI] Update libraries & NavLib to fix missing badges on most profiles. 2019-12-02 22:10:36 +01:00
6a161b3c97 [UI/Timetable] Add showing event indicators on lessons. 2019-12-02 21:25:18 +01:00
3e97572100 [Dialog/Events] Use new event dialog in homework fragment and event list dialog. 2019-12-02 19:36:19 +01:00
fc3b6fd1e0 [UI/Event] Fix stuff because i'm dumb 2019-12-02 19:07:30 +01:00
9bc7f9ac11 [UI/Event] Make use of default values in event manual dialog. 2019-12-02 19:04:30 +01:00
0a2f252405 [UI/Home] Implement home card swapping and saving. 2019-12-02 18:12:52 +01:00
09bc658f97 [UI] Fix blank screen when loading activity. 2019-12-02 18:11:12 +01:00
7b04202a00 [Config] Add the rest of config. Migrate from AppConfig and remove most values from AppConfig. 2019-12-01 22:35:42 +01:00
acf364166b [Notifications/LessonChange] Fix lesson change notifications text. 2019-12-01 21:54:59 +01:00
4e88efae94 [Home/Grades] Fix padding. 2019-12-01 20:25:50 +01:00
8df24dc1c4 [Dialog/Events] Create adapter outside of the observer. 2019-12-01 20:25:28 +01:00
8482c27689 [Timetable] Add marking lessons as seen in timetable. 2019-12-01 20:23:48 +01:00
d1265dc1f2 [Dialog/Events] Make new event list dialog. 2019-11-30 23:33:20 +01:00
47d395de71 [Home] Add home grades card. 2019-11-29 23:16:50 +01:00
5b443e02a3 [Mobidziennik] Fix getting grades with no category. Add support for comments. 2019-11-29 18:59:47 +01:00
f8a7d52b1d [Mobidziennik] Fix extracting when attachment has no size. 2019-11-29 17:51:16 +01:00
a133a96819 [UI/Messages] Make message list scroll to last opened message. 2019-11-29 17:29:23 +01:00
c71b8f994c [Messages] Implement Mobidziennik attachments. Fix multiplying attachments in UI. 2019-11-28 23:32:10 +01:00
9b02c97926 [UI/Messages] Convert adapter to Kotlin. 2019-11-28 23:12:21 +01:00
ab06efc934 [Librus/Attachment] A huge structure reformat. 2019-11-28 23:00:25 +01:00
928b73f139 [Config] Implement per-profile config. Update timetable card. 2019-11-28 21:45:27 +01:00
a36fb09bc3 [Dialog/Event] Add event adding in the new event manual dialog. 2019-11-28 15:11:23 +01:00
eaed4b76aa [Timetable] Fix showing question marks in lesson changes. 2019-11-26 23:11:14 +01:00
6d8960f089 [Home/Timetable] Add click listener to timetable card. 2019-11-26 22:56:43 +01:00
ca3b6d0705 [APIv2/Idziennik] Fix getting subject and rewrite getting proposed grades. 2019-11-26 22:28:52 +01:00
c2e7931ea6 [Config] Implement (basic) new app config storage. 2019-11-26 21:55:04 +01:00
d1a5d8cba9 [APIv2/Vulcan] Fix start time in events. 2019-11-26 21:44:35 +01:00
c2f91e6867 [APIv2] Move AppError to API directory. 2019-11-26 21:10:31 +01:00
55e32b8d88 [APIv2/Librus] Temporarily fix subject in attendance. 2019-11-26 21:02:33 +01:00
462b1df767 [3.9.12-dev] 2019-11-25 22:55:09 +01:00
d17d2c8417 [APIv2/Librus] Fix looking for the lesson in getting homework. 2019-11-25 22:53:55 +01:00
6892832fff [APIv2/Idziennik] Add getting homework and rewrite getting exams. 2019-11-25 22:53:55 +01:00
66d54c7c45 [APIv2/Librus] Fix messages login. 2019-11-25 22:40:14 +01:00
d432685aa8 [Update] Fix update downloading from notification. 2019-11-25 22:23:55 +01:00
37f3d76fb8 [UI] Implement home timetable card. 2019-11-25 22:17:08 +01:00
7961a74995 [APIv2/Events] Fix fetching events and homework. Add DataRemoveModel for events. 2019-11-25 21:13:55 +01:00
9d590508ad [APIv2/Librus] Fix messages session ID extraction. 2019-11-25 15:00:51 +01:00
f79b7eaf83 [3.9.11-dev] 2019-11-24 21:47:05 +01:00
ae13bf946f [Home] Remove useless dummy cards. 2019-11-24 21:21:37 +01:00
f116c4f1f4 [Home] Implement basic timetable card. 2019-11-24 21:15:01 +01:00
867c8920a8 [APIv2/Messages] Add downloading attachments. 2019-11-24 20:55:04 +01:00
6e6dd34872 [UI] Add new Home fragment. Add Lucky number card and number selection dialog. 2019-11-24 19:41:17 +01:00
0759468fa7 [Sync] Add syncing all to manual sync dialog. 2019-11-24 16:47:10 +01:00
1b1fb09211 [APIv2/Vulcan] Fix problems with week start in timetable. 2019-11-24 16:31:51 +01:00
de414c912c [Sync] Fix error when user selects no features. 2019-11-24 13:20:42 +01:00
d274a2fed1 [Timetable] Change date receiver argument to timetableDate. 2019-11-24 13:20:22 +01:00
285b7e9b9e [Timetable] Make going to the specified date on the notification click. 2019-11-24 12:57:00 +01:00
875efcff7e [APIv2/Timetable] Fix ID in lessons. 2019-11-24 12:11:39 +01:00
07ae37167d [Notifications/Timetable] Make notifications for timetable changes 2019-11-24 11:09:45 +01:00
f689f4d427 [APIv2/Timetable] Fix lesson changes metadata. 2019-11-24 10:36:20 +01:00
19bc2b8b37 [3.9.10-dev] New UI + stability fixes 2019-11-23 23:26:19 +01:00
673116e27e [Settings/About] Add a new developer to about! 2019-11-23 23:09:03 +01:00
59fcb0a050 [APIv2/Timetable] Add lesson change metadata only when the lesson is today or in the future 2019-11-23 22:40:20 +01:00
cd76f99bbf [APIv2/Timetable] Add showing unread lesson changes 2019-11-23 22:26:21 +01:00
6a4994b9c2 [APIv2/Timetable] Make swipe refresh download timetable for the selected week 2019-11-23 21:57:30 +01:00
63960c5e05 [APIv2/Timetable] Add selecting date, marking as read and fix stepForward in Date 2019-11-23 21:27:52 +01:00
540afb6a28 [Home] Start making new home timetable card in Kotlin 2019-11-23 19:41:55 +01:00
ae10b8abbd [APIv2/Idziennik] Add new timetable getting and fix week start 2019-11-23 19:40:32 +01:00
db2ebab879 [APIv2/Vulcan] Add missing Lublin endpoints 2019-11-23 19:39:13 +01:00
6ec3d062df [UI] Update header image. Fix fragment bundle passing. 2019-11-23 19:37:00 +01:00
86b6060a09 [UI] Migrate to outlined icons. 2019-11-23 18:32:18 +01:00
83d123e341 [UI] New notifications view. 2019-11-22 22:41:40 +01:00
34061695f9 [UI] Update colored placeholder icons. 2019-11-22 19:23:49 +01:00
de68476442 [UI/Event] Add Sync text to manual event dialog. 2019-11-22 18:42:45 +01:00
678a81a44b [APIv2/Vulcan] Improve Vulcan login when migrating from APIv1. 2019-11-22 18:42:11 +01:00
cfb3096d53 [Sync] Add better task cancelling and better frozen task detection. 2019-11-22 18:41:15 +01:00
9b7aca745a [3.9.9-dev] 2019-11-21 19:18:04 +01:00
82852389fa [UI] Update indentation, again. Fix manual event color selecting. 2019-11-21 18:43:01 +01:00
ce06084e6f [Timetable] Fix lessons removing, again. 2019-11-21 18:24:02 +01:00
3ca051983f [APIv2/Timetable] Add searching for the next lesson by team id 2019-11-20 22:43:48 +01:00
cd379e4175 [APIv2/Librus] Add getting grade comments 2019-11-20 21:16:18 +01:00
62fdfa2b6f [UI] Update manual event dialog. Fix timetable errors. 2019-11-20 21:13:43 +01:00
9866017f7e [APIv2/Vulcan] Fix timetable teams issue. Fix missing login data error. 2019-11-20 19:51:50 +01:00
67f98b08c6 [Update] Update update code to allow update from direct download. 2019-11-20 17:11:08 +01:00
fdb5f7ec02 [APIv2/Mobidziennik] Implement getting message details. 2019-11-18 22:57:23 +01:00
04c3c7ca6e [APIv2] Handle Librus Portal maintenance. 2019-11-18 18:55:52 +01:00
f424315d97 [3.9.8-dev] 2019-11-17 23:17:37 +01:00
c907a8df37 [APIv2] Librus: better error handling. Timetable: fix widget crashing with NPE. 2019-11-17 23:16:13 +01:00
37ea65e3fc [Timetable] Add SwipeToRefresh. Select start&end hours based on lesson ranges. 2019-11-16 21:16:18 +01:00
a3e5f824c8 [UI] Fix messages & homework refresh layout sensitivity. 2019-11-16 18:46:01 +01:00
e0c850a455 [Gradle] Update Tachyon to support creating DayView programmatically. 2019-11-16 17:07:07 +01:00
1c6815f708 [3.9.7-dev] 2019-11-15 22:00:18 +01:00
9a20511935 [UI] Set pull-to-refresh colors. 2019-11-15 21:16:58 +01:00
965f5e73d9 [Bugs] Update gradle. Fix crashes in the timetable widget. 2019-11-15 19:55:46 +01:00
13b58a1d56 [3.9.6-dev] Widgets. Timetables. RIP APIv1. 2019-11-15 00:02:00 +01:00
0a3261b8b3 [APIv2/Mobidziennik] Fix incorrect profile ID in teams & timetable. 2019-11-14 23:46:53 +01:00
dbdfc7fdd8 [Widget] Add new Timetable widget with APIv2. 2019-11-14 23:33:13 +01:00
56062f5bfa [Timetable] Fix day fragment crashing on restoring saved instance 2019-11-14 22:13:32 +01:00
0cbba2eb45 [Models] Make Time comparable. Implement faster Date.stepForward 2019-11-14 19:31:50 +01:00
aa84356dd6 [APIv2/Vulcan] Add getting timetable with lesson changes 2019-11-14 00:41:34 +01:00
efaad0a4dd [APIv1] Remove remaining APIv1 components. [*] 2019-11-13 22:37:30 +01:00
71015c0137 [APIv1] Remove most APIv1 components. 2019-11-13 22:26:12 +01:00
85b5667a7e [Sync] New manual sync dialog. Remove most APIv1 dependencies. 2019-11-13 21:57:47 +01:00
dfdc6817a1 [APIv2/Vulcan] Fix getting sent messages with unknown recipient 2019-11-13 21:01:09 +01:00
058345b9c9 [Error] Add user friendly error strings. Add error snackbar to activity & login. 2019-11-13 19:44:08 +01:00
831b7876b4 [APIv2] Fix duplicated error code 2019-11-13 18:23:21 +01:00
729cf6f08e [Settings] New Profile removal dialog. 2019-11-13 17:19:25 +01:00
860a16b32d [3.9.5-dev] Messages & manual events 2019-11-13 17:19:25 +01:00
9f871c077b [APIv2/Librus] Fix getting messages with unknown recipient 2019-11-13 00:00:28 +01:00
a8f89abf7d [APIv2/Vulcan] Add changing message status 2019-11-12 23:59:48 +01:00
16102de619 [Event] Add new manual event dialog 2019-11-12 23:35:47 +01:00
472e768369 [Gradle] Update MaterialDrawer and NavLib 2019-11-12 23:35:13 +01:00
131a769c26 [Gradle] Update dependencies 2019-11-12 22:05:40 +01:00
4a0a6c54e4 [Timetable] Make timetable sync disable the button on click. 2019-11-12 14:36:20 +01:00
c83abe57d5 [Messages] Implement APIv2 in MessageFragment. 2019-11-12 14:11:35 +01:00
c6e2519dcc [APIv2/Librus] Add getting message info 2019-11-12 00:30:26 +01:00
74db524db6 [Timetable] Add lesson details dialog. 2019-11-11 23:59:45 +01:00
fa99b7fd11 [3.2] Update build.gradle and changelog 2019-10-31 17:57:41 +01:00
9c5653b52e [Gradle] Fix AgendaCalendarView dependencies. 2019-10-31 17:20:07 +01:00
88ad8523a0 [UI] Disable bottom menu gain attention ripple. 2019-10-31 17:19:25 +01:00
a15f59fbd1 [API/Vulcan] Add edu.lublin.eu register support. 2019-10-31 15:40:59 +01:00
188470a043 [UI/Settings] Add option to change app language. 2019-10-28 16:33:25 +01:00
1663 changed files with 88576 additions and 74523 deletions

BIN
.github/apk-badge.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
.github/google-play-badge.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
.github/readme-banner.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

2
.github/utils/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.env
__pycache__/

57
.github/utils/_get_password.py vendored Normal file
View File

@ -0,0 +1,57 @@
import base64
import secrets
from hashlib import sha256
from typing import Tuple
import mysql.connector as mysql
from Crypto.Cipher import AES
def get_password(
version_name: str,
version_code: int,
db_host: str,
db_user: str,
db_pass: str,
db_name: str,
) -> Tuple[str, bytes]:
db = mysql.connect(
host=db_host,
user=db_user,
password=db_pass,
database=db_name,
auth_plugin="mysql_native_password",
)
print(f"Generating passwords for version {version_name} ({version_code})")
password = base64.b64encode(secrets.token_bytes(16)).decode()
iv = secrets.token_bytes(16)
key = f"{version_name}.{password}.{version_code}"
key = sha256(key.encode()).digest()
data = "ThisIsOurHardWorkPleaseDoNotCopyOrSteal(c)2019.KubaSz"
data = sha256(data.encode()).digest()
data = data + (chr(16) * 16).encode()
aes = AES.new(key=key, mode=AES.MODE_CBC, iv=iv)
app_password = base64.b64encode(aes.encrypt(data)).decode()
c = db.cursor()
c.execute(
"INSERT IGNORE INTO _appPasswords (versionCode, appPassword, password, iv) VALUES (%s, %s, %s, %s);",
(version_code, app_password, password, iv),
)
db.commit()
c = db.cursor()
c.execute(
"SELECT password, iv FROM _appPasswords WHERE versionCode = %s;",
(version_code,),
)
row = c.fetchone()
db.close()
return (row[0], row[1])

142
.github/utils/_utils.py vendored Normal file
View File

@ -0,0 +1,142 @@
import re
import subprocess
import sys
from datetime import datetime
from typing import Tuple
VERSION_NAME_REGEX = r'versionName: "(.+?)"'
VERSION_CODE_REGEX = r"versionCode: ([0-9]+)"
VERSION_NAME_FORMAT = 'versionName: "{}"'
VERSION_CODE_FORMAT = "versionCode: {}"
def get_project_dir() -> str:
project_dir = sys.argv[1]
if project_dir[-1:] == "/" or project_dir[-1:] == "\\":
project_dir = project_dir[:-1]
return project_dir
def read_gradle_version(project_dir: str) -> Tuple[int, str]:
GRADLE_PATH = f"{project_dir}/build.gradle"
with open(GRADLE_PATH, "r") as f:
gradle = f.read()
version_name = re.search(VERSION_NAME_REGEX, gradle).group(1)
version_code = int(re.search(VERSION_CODE_REGEX, gradle).group(1))
return (version_code, version_name)
def write_gradle_version(project_dir: str, version_code: int, version_name: str):
GRADLE_PATH = f"{project_dir}/build.gradle"
with open(GRADLE_PATH, "r") as f:
gradle = f.read()
gradle = re.sub(
VERSION_NAME_REGEX, VERSION_NAME_FORMAT.format(version_name), gradle
)
gradle = re.sub(
VERSION_CODE_REGEX, VERSION_CODE_FORMAT.format(version_code), gradle
)
with open(GRADLE_PATH, "w") as f:
f.write(gradle)
def build_version_code(version_name: str) -> int:
version = version_name.split("+")[0].split("-")
version_base = version[0]
version_suffix = version[1] if len(version) == 2 else ""
base_parts = version_base.split(".")
major = int(base_parts[0]) or 0
minor = int(base_parts[1]) if len(base_parts) > 1 else 0
patch = int(base_parts[2]) if len(base_parts) > 2 else 0
beta = 9
rc = 9
if "dev" in version_suffix:
beta = 0
rc = 0
elif "beta." in version_suffix:
beta = int(version_suffix.split(".")[1])
rc = 0
elif "rc." in version_suffix:
beta = 0
rc = int(version_suffix.split(".")[1])
version_code = beta + rc * 10 + patch * 100 + minor * 10000 + major * 1000000
return version_code
def get_changelog(project_dir: str, format: str) -> Tuple[str, str]:
with open(
f"{project_dir}/app/src/main/assets/pl-changelog.html", "r", encoding="utf-8"
) as f:
changelog = f.read()
title = re.search(r"<h3>(.+?)</h3>", changelog).group(1)
content = re.search(r"(?s)<ul>(.+)</ul>", changelog).group(1).strip()
content = "\n".join(line.strip() for line in content.split("\n"))
if format != "html":
content = content.replace("<li>", "- ")
content = content.replace("<br>", "\n")
if format == "markdown":
content = re.sub(r"<u>(.+?)</u>", "__\\1__", content)
content = re.sub(r"<i>(.+?)</i>", "*\\1*", content)
content = re.sub(r"<b>(.+?)</b>", "**\\1**", content)
content = re.sub(r"</?.+?>", "", content)
return (title, content)
def get_commit_log(project_dir: str, format: str, max_lines: int = None) -> str:
last_tag = (
subprocess.check_output("git describe --tags --abbrev=0".split(" "))
.decode()
.strip()
)
log = subprocess.run(
args=f"git log {last_tag}..HEAD --format=%an%x00%at%x00%h%x00%s%x00%D".split(" "),
cwd=project_dir,
stdout=subprocess.PIPE,
)
log = log.stdout.strip().decode()
commits = [line.split("\x00") for line in log.split("\n")]
if max_lines:
commits = commits[:max_lines]
output = []
valid = False
for commit in commits:
if not commit[0]:
continue
if "origin/" in commit[4]:
valid = True
if not valid:
continue
date = datetime.fromtimestamp(float(commit[1]))
date = date.strftime("%Y-%m-%d %H:%M:%S")
if format == "html":
output.append(f"<li>{commit[3]} <i> - {commit[0]}</i></li>")
elif format == "markdown":
output.append(f"[{date}] {commit[0]}\n {commit[3]}")
elif format == "markdown_full":
output.append(
f"_[{date}] {commit[0]}_\n` `__`{commit[2]}`__ **{commit[3]}**"
)
elif format == "plain":
output.append(f"- {commit[3]}")
if format == "markdown":
output.insert(0, "```")
output.append("```")
return "\n".join(output)

69
.github/utils/bump_nightly.py vendored Normal file
View File

@ -0,0 +1,69 @@
import json
import os
import re
import sys
from datetime import datetime, timedelta
import requests
from _utils import (
get_commit_log,
get_project_dir,
read_gradle_version,
write_gradle_version,
)
if __name__ == "__main__":
if len(sys.argv) < 2:
print("usage: bump_nightly.py <project dir>")
exit(-1)
repo = os.getenv("GITHUB_REPOSITORY")
sha = os.getenv("GITHUB_SHA")
if not repo or not sha:
print("Missing GitHub environment variables.")
exit(-1)
with requests.get(
f"https://api.github.com/repos/{repo}/actions/runs?per_page=5&status=success"
) as r:
data = json.loads(r.text)
runs = [run for run in data["workflow_runs"] if run["head_sha"] == sha]
if runs:
print("::set-output name=hasNewChanges::false")
exit(0)
print("::set-output name=hasNewChanges::true")
project_dir = get_project_dir()
(version_code, version_name) = read_gradle_version(project_dir)
version_name = version_name.split("+")[0]
date = datetime.now()
if date.hour > 6:
version_name += "+daily." + date.strftime("%Y%m%d-%H%M")
else:
date -= timedelta(days=1)
version_name += "+nightly." + date.strftime("%Y%m%d")
print("::set-output name=appVersionName::" + version_name)
print("::set-output name=appVersionCode::" + str(version_code))
write_gradle_version(project_dir, version_code, version_name)
commit_log = get_commit_log(project_dir, format="html", max_lines=10)
with open(
f"{project_dir}/app/src/main/assets/pl-changelog.html", "r", encoding="utf-8"
) as f:
changelog = f.read()
changelog = re.sub(r"<h3>(.+?)</h3>", f"<h3>{version_name}</h3>", changelog)
changelog = re.sub(r"(?s)<ul>(.+)</ul>", f"<ul>\n{commit_log}\n</ul>", changelog)
with open(
f"{project_dir}/app/src/main/assets/pl-changelog.html", "w", encoding="utf-8"
) as f:
f.write(changelog)

41
.github/utils/bump_version.py vendored Normal file
View File

@ -0,0 +1,41 @@
import os
from dotenv import load_dotenv
from _get_password import get_password
from _utils import build_version_code, write_gradle_version
from sign import sign
if __name__ == "__main__":
version_name = input("Enter version name: ")
version_code = build_version_code(version_name)
print(f"Bumping version to {version_name} ({version_code})")
project_dir = "../.."
load_dotenv()
DB_HOST = os.getenv("DB_HOST")
DB_USER = os.getenv("DB_USER")
DB_PASS = os.getenv("DB_PASS")
DB_NAME = os.getenv("DB_NAME")
write_gradle_version(project_dir, version_code, version_name)
(password, iv) = get_password(
version_name, version_code, DB_HOST, DB_USER, DB_PASS, DB_NAME
)
sign(project_dir, version_name, version_code, password, iv, commit=False)
print("Writing mock passwords")
os.chdir(project_dir)
os.system(
"sed -i -E 's/\/\*([0-9a-f]{2} ?){16}\*\//\/*secret password - removed for source code publication*\//g' app/src/main/cpp/szkolny-signing.cpp"
)
os.system(
"sed -i -E 's/\\t0x.., 0x(.)., 0x.(.), 0x.(.), 0x.., 0x.., 0x.., 0x.(.), 0x.., 0x.(.), 0x(.)., 0x(.)., 0x.., 0x.., 0x.., 0x.(.)/\\t0x\\3\\6, 0x\\7\\4, 0x\\1\\8, 0x\\2\\5, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff /g' app/src/main/cpp/szkolny-signing.cpp"
)
os.system(
"sed -i -E 's/param1\..(.).(.).(.).(.)..(.)..(.)..(.)..(.).../param1.MTIzNDU2Nzg5MD\\5\\2\\7\\6\\1\\3\\4\8==/g' app/src/main/java/pl/szczodrzynski/edziennik/data/api/szkolny/interceptor/Signing.kt"
)
input("Press any key to finish")

72
.github/utils/extract_changelogs.py vendored Normal file
View File

@ -0,0 +1,72 @@
import os
import sys
from _utils import get_changelog, get_commit_log, get_project_dir, read_gradle_version
if __name__ == "__main__":
if len(sys.argv) < 2:
print("usage: extract_changelogs.py <project dir>")
exit(-1)
project_dir = get_project_dir()
(version_code, version_name) = read_gradle_version(project_dir)
print("::set-output name=appVersionName::" + version_name)
print("::set-output name=appVersionCode::" + str(version_code))
dir = f"{project_dir}/app/release/whatsnew-{version_name}/"
os.makedirs(dir, exist_ok=True)
print("::set-output name=changelogDir::" + dir)
(title, changelog) = get_changelog(project_dir, format="plain")
# plain text changelog - Firebase App Distribution
with open(dir + "whatsnew_titled.txt", "w", encoding="utf-8") as f:
f.write(title)
f.write("\n")
f.write(changelog)
print("::set-output name=changelogPlainTitledFile::" + dir + "whatsnew_titled.txt")
print("::set-output name=changelogTitle::" + title)
# plain text changelog, max 500 chars - Google Play
with open(dir + "whatsnew-pl-PL", "w", encoding="utf-8") as f:
changelog_lines = changelog.split("\n")
changelog = ""
for line in changelog_lines:
if len(changelog) + len(line) < 500:
changelog += "\n" + line
changelog = changelog.strip()
f.write(changelog)
print("::set-output name=changelogPlainFile::" + dir + "whatsnew-pl-PL")
# markdown changelog - Discord webhook
(_, changelog) = get_changelog(project_dir, format="markdown")
with open(dir + "whatsnew.md", "w", encoding="utf-8") as f:
f.write(changelog)
print("::set-output name=changelogMarkdownFile::" + dir + "whatsnew.md")
# html changelog - version info in DB
(_, changelog) = get_changelog(project_dir, format="html")
with open(dir + "whatsnew.html", "w", encoding="utf-8") as f:
f.write(changelog)
print("::set-output name=changelogHtmlFile::" + dir + "whatsnew.html")
changelog = get_commit_log(project_dir, format="plain", max_lines=10)
with open(dir + "commit_log.txt", "w", encoding="utf-8") as f:
f.write(changelog)
print("::set-output name=commitLogPlainFile::" + dir + "commit_log.txt")
changelog = get_commit_log(project_dir, format="markdown", max_lines=10)
with open(dir + "commit_log.md", "w", encoding="utf-8") as f:
f.write(changelog)
print("::set-output name=commitLogMarkdownFile::" + dir + "commit_log.md")
changelog = get_commit_log(project_dir, format="html", max_lines=10)
with open(dir + "commit_log.html", "w", encoding="utf-8") as f:
f.write(changelog)
print("::set-output name=commitLogHtmlFile::" + dir + "commit_log.html")

26
.github/utils/rename_artifacts.py vendored Normal file
View File

@ -0,0 +1,26 @@
import glob
import os
import sys
from _utils import get_project_dir
if __name__ == "__main__":
if len(sys.argv) < 2:
print("usage: rename_artifacts.py <project dir>")
exit(-1)
project_dir = get_project_dir()
files = glob.glob(f"{project_dir}/app/release/*.*")
for file in files:
file_relative = file.replace(os.getenv("GITHUB_WORKSPACE") + "/", "")
if "-aligned.apk" in file:
os.unlink(file)
elif "-signed.apk" in file:
new_file = file.replace("-signed.apk", ".apk")
if os.path.isfile(new_file):
os.unlink(new_file)
os.rename(file, new_file)
elif ".apk" in file or ".aab" in file:
print("::set-output name=signedReleaseFile::" + file)
print("::set-output name=signedReleaseFileRelative::" + file_relative)

122
.github/utils/save_version.py vendored Normal file
View File

@ -0,0 +1,122 @@
import glob
import os
import sys
from datetime import datetime
from time import time
import mysql.connector as mysql
from dotenv import load_dotenv
from _utils import get_changelog, get_commit_log, get_project_dir, read_gradle_version
def save_version(
project_dir: str,
db_host: str,
db_user: str,
db_pass: str,
db_name: str,
apk_server_release: str,
apk_server_nightly: str,
):
db = mysql.connect(
host=db_host,
user=db_user,
password=db_pass,
database=db_name,
auth_plugin="mysql_native_password",
)
(version_code, version_name) = read_gradle_version(project_dir)
(_, changelog) = get_changelog(project_dir, format="html")
types = ["dev", "beta", "nightly", "daily", "rc", "release"]
build_type = [x for x in types if x in version_name]
build_type = build_type[0] if build_type else "release"
if "+nightly." in version_name or "+daily." in version_name:
changelog = get_commit_log(project_dir, format="html")
build_type = "nightly"
elif "-dev" in version_name:
build_type = "dev"
elif "-beta." in version_name:
build_type = "beta"
elif "-rc." in version_name:
build_type = "rc"
build_date = int(time())
apk_name = None
bundle_name_play = None
files = glob.glob(f"{project_dir}/app/release/*.*")
output_apk = f"Edziennik_{version_name}_official.apk"
output_aab_play = f"Edziennik_{version_name}_play.aab"
for file in files:
if output_apk in file:
build_date = int(os.stat(file).st_mtime)
apk_name = output_apk
if output_aab_play in file:
build_date = int(os.stat(file).st_mtime)
bundle_name_play = output_aab_play
build_date = datetime.fromtimestamp(build_date).strftime("%Y-%m-%d %H:%M:%S")
if build_type in ["nightly", "daily"]:
download_url = apk_server_nightly + apk_name if apk_name else None
else:
download_url = apk_server_release + apk_name if apk_name else None
cols = [
"versionCode",
"versionName",
"releaseDate",
"releaseNotes",
"releaseType",
"downloadUrl",
"apkName",
"bundleNamePlay",
]
updated = {
"versionCode": version_code,
"downloadUrl": download_url,
"apkName": apk_name,
"bundleNamePlay": bundle_name_play,
}
values = [
version_code,
version_name,
build_date,
changelog,
build_type,
download_url,
apk_name,
bundle_name_play,
]
values.extend(val for val in updated.values() if val)
updated = ", ".join(f"{col} = %s" for (col, val) in updated.items() if val)
sql = f"INSERT INTO updates ({', '.join(cols)}) VALUES ({'%s, ' * (len(cols) - 1)}%s) ON DUPLICATE KEY UPDATE {updated};"
c = db.cursor()
c.execute(sql, tuple(values))
db.commit()
if __name__ == "__main__":
if len(sys.argv) < 2:
print("usage: save_version.py <project dir>")
exit(-1)
project_dir = get_project_dir()
load_dotenv()
DB_HOST = os.getenv("DB_HOST")
DB_USER = os.getenv("DB_USER")
DB_PASS = os.getenv("DB_PASS")
DB_NAME = os.getenv("DB_NAME")
APK_SERVER_RELEASE = os.getenv("APK_SERVER_RELEASE")
APK_SERVER_NIGHTLY = os.getenv("APK_SERVER_NIGHTLY")
save_version(project_dir, DB_HOST, DB_USER, DB_PASS, DB_NAME, APK_SERVER_RELEASE, APK_SERVER_NIGHTLY)

84
.github/utils/sign.py vendored Normal file
View File

@ -0,0 +1,84 @@
import os
import re
import sys
from dotenv import load_dotenv
from _get_password import get_password
from _utils import get_project_dir, read_gradle_version
def sign(
project_dir: str,
version_name: str,
version_code: int,
password: str,
iv: bytes,
commit: bool = False,
):
SIGNING_PATH = f"{project_dir}/app/src/main/java/pl/szczodrzynski/edziennik/data/api/szkolny/interceptor/Signing.kt"
CPP_PATH = f"{project_dir}/app/src/main/cpp/szkolny-signing.cpp"
with open(SIGNING_PATH, "r") as f:
signing = f.read()
with open(CPP_PATH, "r") as f:
cpp = f.read()
SIGNING_REGEX = r"\$param1\..*\.\$param2"
CPP_REGEX = r"(?s)/\*.+?toys AES_IV\[16\] = {.+?};"
SIGNING_FORMAT = "$param1.{}.$param2"
CPP_FORMAT = "/*{}*/\nstatic toys AES_IV[16] = {{\n\t{} }};"
print(f"Writing passwords for version {version_name} ({version_code})")
iv_hex = " ".join(["{:02x}".format(x) for x in iv])
iv_cpp = ", ".join(["0x{:02x}".format(x) for x in iv])
signing = re.sub(SIGNING_REGEX, SIGNING_FORMAT.format(password), signing)
cpp = re.sub(CPP_REGEX, CPP_FORMAT.format(iv_hex, iv_cpp), cpp)
with open(SIGNING_PATH, "w") as f:
f.write(signing)
with open(CPP_PATH, "w") as f:
f.write(cpp)
if commit:
os.chdir(project_dir)
os.system("git add .")
os.system(
f'git commit -m "[{version_name}] Update build.gradle, signing and changelog."'
)
if __name__ == "__main__":
if len(sys.argv) < 2:
print("usage: sign.py <project dir> [commit]")
exit(-1)
project_dir = get_project_dir()
load_dotenv()
DB_HOST = os.getenv("DB_HOST")
DB_USER = os.getenv("DB_USER")
DB_PASS = os.getenv("DB_PASS")
DB_NAME = os.getenv("DB_NAME")
(version_code, version_name) = read_gradle_version(project_dir)
(password, iv) = get_password(
version_name, version_code, DB_HOST, DB_USER, DB_PASS, DB_NAME
)
print("::set-output name=appVersionName::" + version_name)
print("::set-output name=appVersionCode::" + str(version_code))
sign(
project_dir,
version_name,
version_code,
password,
iv,
commit="commit" in sys.argv,
)

118
.github/utils/webhook_discord.py vendored Normal file
View File

@ -0,0 +1,118 @@
import os
import sys
from datetime import datetime
import requests
from dotenv import load_dotenv
from _utils import get_changelog, get_commit_log, get_project_dir, read_gradle_version
def post_webhook(
project_dir: str,
apk_file: str,
apk_server_release: str,
apk_server_nightly: str,
webhook_release: str,
webhook_testing: str,
):
(_, version_name) = read_gradle_version(project_dir)
types = ["dev", "beta", "nightly", "daily", "rc", "release"]
build_type = [x for x in types if x in version_name]
build_type = build_type[0] if build_type else None
testing = ["dev", "beta", "nightly", "daily"]
testing = build_type in testing
apk_name = os.path.basename(apk_file)
if build_type in ["nightly", "daily"]:
download_url = apk_server_nightly + apk_name
else:
download_url = apk_server_release + apk_name
if testing:
build_date = int(os.stat(apk_file).st_mtime)
if build_date:
build_date = datetime.fromtimestamp(build_date).strftime("%Y-%m-%d %H:%M")
# untagged release, get commit log
if build_type in ["nightly", "daily"]:
changelog = get_commit_log(project_dir, format="markdown", max_lines=5)
else:
changelog = get_changelog(project_dir, format="markdown")
webhook = get_webhook_testing(
version_name, build_type, changelog, download_url, build_date
)
requests.post(url=webhook_testing, json=webhook)
else:
changelog = get_changelog(project_dir, format="markdown")
webhook = get_webhook_release(changelog, download_url)
requests.post(url=webhook_release, json=webhook)
def get_webhook_release(changelog: str, download_url: str):
(title, content) = changelog
return {"content": f"__**{title}**__\n{content}\n{download_url}"}
def get_webhook_testing(
version_name: str,
build_type: str,
changelog: str,
download_url: str,
build_date: str,
):
return {
"embeds": [
{
"title": f"Nowa wersja {build_type} aplikacji Szkolny.eu",
"description": f"Dostępna jest nowa wersja testowa **{build_type}**.",
"color": 2201331,
"fields": [
{
"name": f"Wersja `{version_name}`",
"value": f"[Pobierz .APK]({download_url})"
if download_url
else "*Pobieranie niedostępne*",
"inline": False,
},
{
"name": "Data kompilacji",
"value": build_date or "-",
"inline": False,
},
{
"name": "Ostatnie zmiany",
"value": changelog or "-",
"inline": False,
},
],
}
]
}
if __name__ == "__main__":
if len(sys.argv) < 2:
print("usage: webhook_discord.py <project dir>")
exit(-1)
project_dir = get_project_dir()
load_dotenv()
APK_FILE = os.getenv("APK_FILE")
APK_SERVER_RELEASE = os.getenv("APK_SERVER_RELEASE")
APK_SERVER_NIGHTLY = os.getenv("APK_SERVER_NIGHTLY")
WEBHOOK_RELEASE = os.getenv("WEBHOOK_RELEASE")
WEBHOOK_TESTING = os.getenv("WEBHOOK_TESTING")
post_webhook(
project_dir,
APK_FILE,
APK_SERVER_RELEASE,
APK_SERVER_NIGHTLY,
WEBHOOK_RELEASE,
WEBHOOK_TESTING,
)

154
.github/workflows/build-nightly-apk.yml vendored Normal file
View File

@ -0,0 +1,154 @@
name: Nightly build
on:
schedule:
# 23:30 UTC, 0:30 or 1:30 CET/CEST
- cron: "30 23 * * *"
workflow_dispatch:
jobs:
prepare:
name: Prepare build environment
runs-on: self-hosted
outputs:
hasNewChanges: ${{ steps.nightly.outputs.hasNewChanges }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
clean: false
- name: Set executable permissions to gradlew
run: chmod +x ./gradlew
- name: Setup Python
uses: actions/setup-python@v2
- name: Install packages
uses: BSFishy/pip-action@v1
with:
packages: |
python-dotenv
pycryptodome
mysql-connector-python
requests
- name: Bump nightly version
id: nightly
run: python $GITHUB_WORKSPACE/.github/utils/bump_nightly.py $GITHUB_WORKSPACE
- name: Write signing passwords
if: steps.nightly.outputs.hasNewChanges
env:
DB_HOST: ${{ secrets.DB_HOST }}
DB_USER: ${{ secrets.DB_USER }}
DB_PASS: ${{ secrets.DB_PASS }}
DB_NAME: ${{ secrets.DB_NAME }}
run: python $GITHUB_WORKSPACE/.github/utils/sign.py $GITHUB_WORKSPACE commit
build:
name: Build APK
runs-on: self-hosted
needs:
- prepare
if: ${{ needs.prepare.outputs.hasNewChanges == 'true' }}
outputs:
androidHome: ${{ env.ANDROID_HOME }}
androidSdkRoot: ${{ env.ANDROID_SDK_ROOT }}
steps:
- name: Setup JDK 11
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '11'
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Clean build artifacts
run: |
rm -rf app/release/*
rm -rf app/build/outputs/apk/*
rm -rf app/build/outputs/bundle/*
- name: Assemble official release with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: assembleOfficialRelease
sign:
name: Sign APK
runs-on: self-hosted
needs:
- build
outputs:
signedReleaseFile: ${{ steps.artifacts.outputs.signedReleaseFile }}
signedReleaseFileRelative: ${{ steps.artifacts.outputs.signedReleaseFileRelative }}
steps:
- name: Sign build artifacts
id: sign_app
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/release
signingKeyBase64: ${{ secrets.KEY_STORE }}
alias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_ALIAS_PASSWORD }}
env:
ANDROID_HOME: ${{ needs.build.outputs.androidHome }}
ANDROID_SDK_ROOT: ${{ needs.build.outputs.androidSdkRoot }}
BUILD_TOOLS_VERSION: "30.0.2"
- name: Rename signed artifacts
id: artifacts
run: python $GITHUB_WORKSPACE/.github/utils/rename_artifacts.py $GITHUB_WORKSPACE
publish:
name: Publish APK
runs-on: self-hosted
needs:
- sign
steps:
- name: Setup Python
uses: actions/setup-python@v2
- name: Extract changelogs
id: changelog
run: python $GITHUB_WORKSPACE/.github/utils/extract_changelogs.py $GITHUB_WORKSPACE
- name: Upload APK to SFTP
uses: easingthemes/ssh-deploy@v2.1.6
env:
REMOTE_HOST: ${{ secrets.SSH_IP }}
REMOTE_USER: ${{ secrets.SSH_USERNAME }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY }}
SOURCE: ${{ needs.sign.outputs.signedReleaseFileRelative }}
TARGET: ${{ secrets.SSH_PATH_NIGHTLY }}
- name: Save version metadata
env:
DB_HOST: ${{ secrets.DB_HOST }}
DB_USER: ${{ secrets.DB_USER }}
DB_PASS: ${{ secrets.DB_PASS }}
DB_NAME: ${{ secrets.DB_NAME }}
APK_SERVER_RELEASE: ${{ secrets.APK_SERVER_RELEASE }}
APK_SERVER_NIGHTLY: ${{ secrets.APK_SERVER_NIGHTLY }}
run: python $GITHUB_WORKSPACE/.github/utils/save_version.py $GITHUB_WORKSPACE
- name: Distribute to App Distribution
uses: wzieba/Firebase-Distribution-Github-Action@v1
with:
appId: ${{ secrets.FIREBASE_APP_ID }}
token: ${{ secrets.FIREBASE_TOKEN }}
groups: ${{ secrets.FIREBASE_GROUPS_NIGHTLY }}
file: ${{ needs.sign.outputs.signedReleaseFile }}
releaseNotesFile: ${{ steps.changelog.outputs.commitLogPlainFile }}
- name: Post Discord webhook
env:
APK_FILE: ${{ needs.sign.outputs.signedReleaseFile }}
APK_SERVER_RELEASE: ${{ secrets.APK_SERVER_RELEASE }}
APK_SERVER_NIGHTLY: ${{ secrets.APK_SERVER_NIGHTLY }}
WEBHOOK_RELEASE: ${{ secrets.WEBHOOK_RELEASE }}
WEBHOOK_TESTING: ${{ secrets.WEBHOOK_TESTING }}
run: python $GITHUB_WORKSPACE/.github/utils/webhook_discord.py $GITHUB_WORKSPACE
- name: Upload workflow artifact
uses: actions/upload-artifact@v2
if: true
with:
name: ${{ steps.changelog.outputs.appVersionName }}
path: |
app/release/whatsnew*/
app/release/*.apk
app/release/*.aab
app/release/*.json
app/release/*.txt

View File

@ -0,0 +1,132 @@
name: Release build - Google Play [AAB]
on:
push:
branches:
- "master"
jobs:
prepare:
name: Prepare build environment
runs-on: self-hosted
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
clean: false
- name: Set executable permissions to gradlew
run: chmod +x ./gradlew
- name: Setup Python
uses: actions/setup-python@v2
- name: Install packages
uses: BSFishy/pip-action@v1
with:
packages: |
python-dotenv
pycryptodome
mysql-connector-python
requests
- name: Write signing passwords
env:
DB_HOST: ${{ secrets.DB_HOST }}
DB_USER: ${{ secrets.DB_USER }}
DB_PASS: ${{ secrets.DB_PASS }}
DB_NAME: ${{ secrets.DB_NAME }}
run: python $GITHUB_WORKSPACE/.github/utils/sign.py $GITHUB_WORKSPACE commit
build:
name: Build App Bundle
runs-on: self-hosted
needs:
- prepare
outputs:
androidHome: ${{ env.ANDROID_HOME }}
androidSdkRoot: ${{ env.ANDROID_SDK_ROOT }}
steps:
- name: Setup JDK 11
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '11'
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Clean build artifacts
run: |
rm -rf app/release/*
rm -rf app/build/outputs/apk/*
rm -rf app/build/outputs/bundle/*
- name: Bundle play release with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: bundlePlayRelease
sign:
name: Sign App Bundle
runs-on: self-hosted
needs:
- build
outputs:
signedReleaseFile: ${{ steps.artifacts.outputs.signedReleaseFile }}
signedReleaseFileRelative: ${{ steps.artifacts.outputs.signedReleaseFileRelative }}
steps:
- name: Sign build artifacts
id: sign_app
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/release
signingKeyBase64: ${{ secrets.KEY_STORE }}
alias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_ALIAS_PASSWORD }}
env:
ANDROID_HOME: ${{ needs.build.outputs.androidHome }}
ANDROID_SDK_ROOT: ${{ needs.build.outputs.androidSdkRoot }}
BUILD_TOOLS_VERSION: "30.0.2"
- name: Rename signed artifacts
id: artifacts
run: python $GITHUB_WORKSPACE/.github/utils/rename_artifacts.py $GITHUB_WORKSPACE
publish:
name: Publish App Bundle
runs-on: self-hosted
needs:
- sign
steps:
- name: Setup Python
uses: actions/setup-python@v2
- name: Extract changelogs
id: changelog
run: python $GITHUB_WORKSPACE/.github/utils/extract_changelogs.py $GITHUB_WORKSPACE
- name: Save version metadata
env:
DB_HOST: ${{ secrets.DB_HOST }}
DB_USER: ${{ secrets.DB_USER }}
DB_PASS: ${{ secrets.DB_PASS }}
DB_NAME: ${{ secrets.DB_NAME }}
APK_SERVER_RELEASE: ${{ secrets.APK_SERVER_RELEASE }}
APK_SERVER_NIGHTLY: ${{ secrets.APK_SERVER_NIGHTLY }}
run: python $GITHUB_WORKSPACE/.github/utils/save_version.py $GITHUB_WORKSPACE
- name: Publish AAB to Google Play
uses: r0adkll/upload-google-play@v1
if: ${{ endsWith(needs.sign.outputs.signedReleaseFile, '.aab') }}
with:
serviceAccountJsonPlainText: ${{ secrets.PLAY_SERVICE_ACCOUNT_JSON }}
packageName: pl.szczodrzynski.edziennik
releaseFiles: ${{ needs.sign.outputs.signedReleaseFile }}
releaseName: ${{ steps.changelog.outputs.appVersionName }}
track: ${{ secrets.PLAY_RELEASE_TRACK }}
whatsNewDirectory: ${{ steps.changelog.outputs.changelogDir }}
status: completed
- name: Upload workflow artifact
uses: actions/upload-artifact@v2
if: always()
with:
name: ${{ steps.changelog.outputs.appVersionName }}
path: |
app/release/whatsnew*/
app/release/*.apk
app/release/*.aab
app/release/*.json
app/release/*.txt

154
.github/workflows/build-release-apk.yml vendored Normal file
View File

@ -0,0 +1,154 @@
name: Release build - official
on:
push:
tags:
- "*"
jobs:
prepare:
name: Prepare build environment
runs-on: self-hosted
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
clean: false
- name: Set executable permissions to gradlew
run: chmod +x ./gradlew
- name: Setup Python
uses: actions/setup-python@v2
- name: Install packages
uses: BSFishy/pip-action@v1
with:
packages: |
python-dotenv
pycryptodome
mysql-connector-python
requests
- name: Write signing passwords
env:
DB_HOST: ${{ secrets.DB_HOST }}
DB_USER: ${{ secrets.DB_USER }}
DB_PASS: ${{ secrets.DB_PASS }}
DB_NAME: ${{ secrets.DB_NAME }}
run: python $GITHUB_WORKSPACE/.github/utils/sign.py $GITHUB_WORKSPACE commit
build:
name: Build APK
runs-on: self-hosted
needs:
- prepare
outputs:
androidHome: ${{ env.ANDROID_HOME }}
androidSdkRoot: ${{ env.ANDROID_SDK_ROOT }}
steps:
- name: Setup JDK 11
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '11'
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Clean build artifacts
run: |
rm -rf app/release/*
rm -rf app/build/outputs/apk/*
rm -rf app/build/outputs/bundle/*
- name: Assemble official release with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: assembleOfficialRelease
sign:
name: Sign APK
runs-on: self-hosted
needs:
- build
outputs:
signedReleaseFile: ${{ steps.artifacts.outputs.signedReleaseFile }}
signedReleaseFileRelative: ${{ steps.artifacts.outputs.signedReleaseFileRelative }}
steps:
- name: Sign build artifacts
id: sign_app
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/release
signingKeyBase64: ${{ secrets.KEY_STORE }}
alias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_ALIAS_PASSWORD }}
env:
ANDROID_HOME: ${{ needs.build.outputs.androidHome }}
ANDROID_SDK_ROOT: ${{ needs.build.outputs.androidSdkRoot }}
BUILD_TOOLS_VERSION: "30.0.2"
- name: Rename signed artifacts
id: artifacts
run: python $GITHUB_WORKSPACE/.github/utils/rename_artifacts.py $GITHUB_WORKSPACE
publish:
name: Publish APK
runs-on: self-hosted
needs:
- sign
steps:
- name: Setup Python
uses: actions/setup-python@v2
- name: Extract changelogs
id: changelog
run: python $GITHUB_WORKSPACE/.github/utils/extract_changelogs.py $GITHUB_WORKSPACE
- name: Upload APK to SFTP
uses: easingthemes/ssh-deploy@v2.1.6
env:
REMOTE_HOST: ${{ secrets.SSH_IP }}
REMOTE_USER: ${{ secrets.SSH_USERNAME }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY }}
SOURCE: ${{ needs.sign.outputs.signedReleaseFileRelative }}
TARGET: ${{ secrets.SSH_PATH_RELEASE }}
- name: Save version metadata
env:
DB_HOST: ${{ secrets.DB_HOST }}
DB_USER: ${{ secrets.DB_USER }}
DB_PASS: ${{ secrets.DB_PASS }}
DB_NAME: ${{ secrets.DB_NAME }}
APK_SERVER_RELEASE: ${{ secrets.APK_SERVER_RELEASE }}
APK_SERVER_NIGHTLY: ${{ secrets.APK_SERVER_NIGHTLY }}
run: python $GITHUB_WORKSPACE/.github/utils/save_version.py $GITHUB_WORKSPACE
- name: Distribute to App Distribution
uses: wzieba/Firebase-Distribution-Github-Action@v1
with:
appId: ${{ secrets.FIREBASE_APP_ID }}
token: ${{ secrets.FIREBASE_TOKEN }}
groups: ${{ secrets.FIREBASE_GROUPS_RELEASE }}
file: ${{ needs.sign.outputs.signedReleaseFile }}
releaseNotesFile: ${{ steps.changelog.outputs.changelogPlainTitledFile }}
- name: Release on GitHub
uses: softprops/action-gh-release@v1
with:
name: ${{ steps.changelog.outputs.changelogTitle }}
body_path: ${{ steps.changelog.outputs.changelogMarkdownFile }}
files: ${{ needs.sign.outputs.signedReleaseFile }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Post Discord webhook
env:
APK_FILE: ${{ needs.sign.outputs.signedReleaseFile }}
APK_SERVER_RELEASE: ${{ secrets.APK_SERVER_RELEASE }}
APK_SERVER_NIGHTLY: ${{ secrets.APK_SERVER_NIGHTLY }}
WEBHOOK_RELEASE: ${{ secrets.WEBHOOK_RELEASE }}
WEBHOOK_TESTING: ${{ secrets.WEBHOOK_TESTING }}
run: python $GITHUB_WORKSPACE/.github/utils/webhook_discord.py $GITHUB_WORKSPACE
- name: Upload workflow artifact
uses: actions/upload-artifact@v2
if: true
with:
name: ${{ steps.changelog.outputs.appVersionName }}
path: |
app/release/whatsnew*/
app/release/*.apk
app/release/*.aab
app/release/*.json
app/release/*.txt

195
.gitignore vendored
View File

@ -1,5 +1,11 @@
# Created by https://www.toptal.com/developers/gitignore/api/android,androidstudio,gradle,java,kotlin
# Edit at https://www.toptal.com/developers/gitignore?templates=android,androidstudio,gradle,java,kotlin
### Android ###
# Built application files
*.apk
*.aar
*.ap_
*.aab
@ -23,7 +29,7 @@ build/
local.properties
# Proguard folder generated by Eclipse
#proguard/
# proguard/
# Log Files
*.log
@ -40,22 +46,22 @@ captures/
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
#.idea/dictionaries
.idea/libraries
# Android Studio 3 in .gitignore file.
.idea/caches
.idea/modules.xml
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
.idea/navEditor.xml
.idea/copyright/profiles_settings.xml
# Keystore files
# Uncomment the following lines if you do not want to check your keystore files in.
*.jks
*.keystore
#*.jks
#*.keystore
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
.cxx/
# Google Services (e.g. APIs or Firebase)
# google-services.json
@ -81,3 +87,182 @@ lint/generated/
lint/outputs/
lint/tmp/
# lint/reports/
### Android Patch ###
gen-external-apklibs
output-metadata.json
# Replacement of .externalNativeBuild directories introduced
# with Android Studio 3.5.
### Java ###
# Compiled class file
# Log file
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
!/*/libs/*.jar
### Kotlin ###
# Compiled class file
# Log file
# BlueJ files
# Mobile Tools for Java (J2ME)
# Package Files #
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
### Gradle ###
.gradle
# Ignore Gradle GUI config
gradle-app.setting
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar
# Cache of project
.gradletasknamecache
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties
### Gradle Patch ###
**/build/
### AndroidStudio ###
# Covers files to be ignored for android development using Android Studio.
# Built application files
# Files for the ART/Dalvik VM
# Java class files
# Generated files
# Gradle files
# Signing files
.signing/
# Local configuration file (sdk path, etc)
# Proguard folder generated by Eclipse
# Log Files
# Android Studio
/*/build/
/*/local.properties
/*/out
/*/*/build
/*/*/production
*.ipr
*~
*.swp
# Keystore files
*.jks
*.keystore
# Google Services (e.g. APIs or Firebase)
# google-services.json
# Android Patch
# External native build folder generated in Android Studio 2.2 and later
# NDK
obj/
# IntelliJ IDEA
*.iws
/out/
# User-specific configurations
.idea/caches/
.idea/libraries/
.idea/shelf/
.idea/.name
.idea/compiler.xml
.idea/copyright/profiles_settings.xml
.idea/encodings.xml
.idea/misc.xml
.idea/scopes/scope_settings.xml
.idea/vcs.xml
.idea/jsLibraryMappings.xml
.idea/datasources.xml
.idea/dataSources.ids
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml
.idea/jarRepositories.xml
# OS-specific files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
# Legacy Eclipse project files
.classpath
.project
.cproject
.settings/
# Mobile Tools for Java (J2ME)
# Package Files #
# virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml)
## Plugin-specific files:
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Mongo Explorer plugin
.idea/mongoSettings.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
### AndroidStudio Patch ###
!/gradle/wrapper/gradle-wrapper.jar
# End of https://www.toptal.com/developers/gitignore/api/android,androidstudio,gradle,java,kotlin
signatures/
.idea/*.xml

View File

@ -1,6 +1,19 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<JetCodeStyleSettings>
<option name="NAME_COUNT_TO_USE_STAR_IMPORT" value="2147483647" />
<option name="ALLOW_TRAILING_COMMA" value="true" />
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</JetCodeStyleSettings>
<codeStyleSettings language="JSON">
<indentOptions>
<option name="INDENT_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="true" />
<option name="SMART_TABS" value="true" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="XML">
<option name="FORCE_REARRANGE_MODE" value="1" />
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
@ -112,5 +125,8 @@
</rules>
</arrangement>
</codeStyleSettings>
<codeStyleSettings language="kotlin">
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</codeStyleSettings>
</code_scheme>
</component>

5
.idea/codeStyles/codeStyleConfig.xml generated Normal file
View File

@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</state>
</component>

6
.idea/copyright/Antoni.xml generated Normal file
View File

@ -0,0 +1,6 @@
<component name="CopyrightManager">
<copyright>
<option name="notice" value="Copyright (c) Antoni Czaplicki &amp;#36;{today.year}-&amp;#36;{today.month}-&amp;#36;{today.day}. " />
<option name="myName" value="Antoni" />
</copyright>
</component>

20
.idea/dictionaries/Kuba.xml generated Normal file
View File

@ -0,0 +1,20 @@
<component name="ProjectDictionaryState">
<dictionary name="Kuba">
<words>
<w>autoryzacji</w>
<w>ciasteczko</w>
<w>csrf</w>
<w>edziennik</w>
<w>eggfall</w>
<w>elearning</w>
<w>gson</w>
<w>hebe</w>
<w>idziennik</w>
<w>kuba</w>
<w>synergia</w>
<w>szczodrzyński</w>
<w>szkolny</w>
<w>usos</w>
</words>
</dictionary>
</component>

9
.idea/discord.xml generated
View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DiscordProjectSettings">
<option name="show" value="true" />
</component>
<component name="ProjectNotificationSettings">
<option name="askShowProject" value="false" />
</component>
</project>

4
.idea/encodings.xml generated
View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
</project>

6
.idea/kotlinc.xml generated
View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Kotlin2JvmCompilerArguments">
<option name="jvmTarget" value="1.8" />
</component>
</project>

58
.idea/misc.xml generated
View File

@ -1,58 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CMakeSettings">
<configurations>
<configuration PROFILE_NAME="Debug" CONFIG_NAME="Debug" />
</configurations>
</component>
<component name="EntryPointsManager">
<list size="1">
<item index="0" class="java.lang.String" itemvalue="org.greenrobot.eventbus.Subscribe" />
</list>
</component>
<component name="NullableNotNullManager">
<option name="myDefaultNullable" value="org.jetbrains.annotations.Nullable" />
<option name="myDefaultNotNull" value="androidx.annotation.RecentlyNonNull" />
<option name="myNullables">
<value>
<list size="12">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
<item index="2" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" />
<item index="3" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
<item index="4" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
<item index="5" class="java.lang.String" itemvalue="androidx.annotation.Nullable" />
<item index="6" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNullable" />
<item index="7" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.Nullable" />
<item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableDecl" />
<item index="9" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableType" />
<item index="10" class="java.lang.String" itemvalue="android.annotation.Nullable" />
<item index="11" class="java.lang.String" itemvalue="com.android.annotations.Nullable" />
</list>
</value>
</option>
<option name="myNotNulls">
<value>
<list size="11">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
<item index="4" class="java.lang.String" itemvalue="androidx.annotation.NonNull" />
<item index="5" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNonNull" />
<item index="6" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.NonNull" />
<item index="7" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullDecl" />
<item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullType" />
<item index="9" class="java.lang.String" itemvalue="android.annotation.NonNull" />
<item index="10" class="java.lang.String" itemvalue="com.android.annotations.NonNull" />
</list>
</value>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
</set>
</option>
</component>
</project>

621
LICENSE Normal file
View File

@ -0,0 +1,621 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS

View File

@ -1 +1,85 @@
Szkolny.eu
<div align="center">
![Readme Banner](.github/readme-banner.png)
[![Discord](https://img.shields.io/discord/619178050562686988?color=%237289DA&logo=discord&logoColor=white&style=for-the-badge)](https://szkolny.eu/discord)
[![Oficjalna strona](https://img.shields.io/badge/-website-orange?style=for-the-badge&logo=internet-explorer&logoColor=white)](https://szkolny.eu/)
[![Facebook Fanpage](https://img.shields.io/badge/-facebook-blue?style=for-the-badge&logo=facebook&logoColor=white)](https://szkolny.eu/facebook)
![Wersja Androida](https://img.shields.io/badge/android-4.1%2B-orange?style=for-the-badge&logo=android)
[![Najnowsza wersja](https://img.shields.io/github/v/release/szkolny-eu/szkolny-android?color=%2344CC11&include_prereleases&logo=github&logoColor=white&style=for-the-badge)](https://github.com/szkolny-eu/szkolny-android/releases/latest)
![Licencja](https://img.shields.io/github/license/szkolny-eu/szkolny-android?color=blue&logo=github&logoColor=white&style=for-the-badge)
[![Release build](https://img.shields.io/github/workflow/status/szkolny-eu/szkolny-android/Release%20build%20-%20official?label=Release&logo=github-actions&logoColor=white&style=for-the-badge)](https://github.com/szkolny-eu/szkolny-android/actions/workflows/build-release-apk.yml)
[![Play build](https://img.shields.io/github/workflow/status/szkolny-eu/szkolny-android/Release%20build%20-%20Google%20Play%20%5BAAB%5D?label=Play&logo=google-play&logoColor=white&style=for-the-badge)](https://github.com/szkolny-eu/szkolny-android/actions/workflows/build-release-aab-play.yml)
[![Nightly build](https://img.shields.io/github/workflow/status/szkolny-eu/szkolny-android/Nightly%20build?label=Nightly&logo=github-actions&logoColor=white&style=for-the-badge)](https://github.com/szkolny-eu/szkolny-android/actions/workflows/build-nightly-apk.yml)
</div>
## Ważna informacja
Jak zapewne już wiecie, we wrześniu 2020 r. **firma Librus zabroniła nam** publikowania w sklepie Google Play naszej aplikacji z obsługą dziennika Librus&reg; Synergia. Prowadziliśmy rozmowy, aby **umożliwić Wam wygodny, bezpłatny dostęp do Waszych ocen, wiadomości, zadań domowych**, jednak oczekiwania firmy Librus zdecydowanie przekroczyły wszelkie nasze możliwości finansowe. Mając na uwadze powyższe względy, zdecydowaliśmy się opublikować kod źródłowy aplikacji Szkolny.eu. Liczymy, że dzięki temu aplikacja będzie mogła dalej funkcjonować, być rozwijana, pomagając Wam w czasie zdalnego nauczania i przez kolejne lata nauki.
__Zachęcamy do [przeczytania całej informacji](https://szkolny.eu/informacja) na naszej stronie.__
*- Autorzy Szkolny.eu*
## O aplikacji
Szkolny.eu jest nieoficjalną aplikacją, umożliwiającą rodzicom i uczniom dostęp do danych z e-dziennika w każdym smartfonie. Jest to jedyna aplikacja, która posiada wsparcie dla wszystkich najpopularniejszych e-dzienników. Oznacza to, że mając kilka kont w różnych szkołach, wystarczy mieć tylko jedną aplikację.
### Funkcje aplikacji
- plan lekcji, terminarz, oceny, wiadomości, zadania domowe, uwagi, frekwencja
- wygodne **widgety** na ekran główny
- łatwa komunikacja z nauczycielami — **odbieranie, wyszukiwanie i wysyłanie wiadomości**
- pobieranie **załączników wiadomości i zadań domowych**
- **powiadomienia** o nowych informacjach na telefonie lub na komputerze
- organizacja zadań domowych i sprawdzianów — łatwe oznaczanie jako wykonane
- obliczanie **średniej ocen** ze wszystkich przedmiotów, oceny proponowane i końcowe
- Symulator edycji ocen — obliczanie średniej z przedmiotu po zmianie dowolnych jego ocen
- **dodawanie własnych wydarzeń** i zadań do terminarza
- nowoczesny i intuicyjny interfejs użytkownika
- **obsługa wielu profili** uczniów — jeżeli jesteś Rodzicem, możesz skonfigurować wszystkie swoje konta uczniowskie i łatwo między nimi przełączać
- opcja **automatycznej synchronizacji** z E-dziennikiem
- opcja Ciszy nocnej — nigdy więcej budzących Cię dźwięków z telefonu
[Zobacz porównanie funkcji z innymi aplikacjami](https://szkolny.eu/funkcje)
### Pobieranie
Najnowsze wersje możesz pobrać z Google Play lub bezpośrednio z naszej strony, w formacie .APK.
[<img src=".github/google-play-badge.png" height="100px">](https://szkolny.eu/pobierz/android)
[<img src=".github/apk-badge.png" height="100px">](https://szkolny.eu/pobierz)
### Kompilacja
Aby uruchomić aplikację „ze źródeł” należy użyć Android Studio w wersji co najmniej 4.2 Beta 6. Wersja `debug` może wtedy zostać zainstalowana np. na emulatorze Androida.
Aby zbudować wersję produkcyjną, tzn. `release` należy użyć wariantu `mainRelease` oraz podpisać wyjściowy plik .APK sygnaturą w wersji V1 i V2.
Warianty `play` oraz `official` są zastrzeżone dla wydań oficjalnych.
## Współpraca
PRy wprowadzające nowe funkcje lub naprawiające błędy są mile widziane!
__Jeśli masz jakieś pytania, zapraszamy na [nasz serwer Discord](https://szkolny.eu/discord).__
## Licencja
Szkolny.eu publikowany jest na licencji [GNU GPLv3](LICENSE). W szczególności, deweloper:
- Może modyfikować oraz usprawniać kod aplikacji
- Może dystrybuować wersje produkcyjne
- Musi opublikować wszelkie wprowadzone zmiany, tzn. publiczny fork tego repozytorium
- Nie może zmieniać licencji ani copyrightu aplikacji
Dodatkowo:
- Zabronione jest modyfikowanie lub usuwanie kodu odpowiedzialnego za zgodność wersji produkcyjnych z licencją.
- **Wersje skompilowane nie mogą być dystrybuowane za pomocą Google Play oraz żadnej platformy, na której istnieje oficjalna wersja aplikacji**.
**Autorzy aplikacji nie biorą odpowiedzialności za używanie aplikacji, modyfikowanie oraz dystrybuowanie.**
Znaki towarowe zamieszczone w aplikacji oraz tym dokumencie należą do ich prawowitych właścicieli i są używane wyłącznie w celach informacyjnych.

View File

@ -1 +0,0 @@
/build

View File

@ -1,54 +0,0 @@
apply plugin: 'com.android.library'
//apply plugin: 'me.tatarka.retrolambda'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
android {
lintOptions {
abortOnError false
}
}
defaultConfig {
minSdkVersion 14
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debugMinify {
debuggable = true
minifyEnabled = true
proguardFiles 'proguard-android.txt'
}
}
sourceSets {
main {
assets.srcDirs = ['assets']
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
//apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
// Google libraries
implementation "androidx.appcompat:appcompat:${androidXAppCompat}"
implementation "androidx.recyclerview:recyclerview:${androidXRecyclerView}"
implementation "com.google.android.material:material:${googleMaterial}"
// other libraries
//implementation 'se.emilsjolander:stickylistheaders:2.7.0'
implementation 'com.github.edisonw:StickyListHeaders:master-SNAPSHOT@aar'
implementation 'io.reactivex:rxjava:1.1.1'
}

View File

@ -1,3 +0,0 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.github.tibolte.agendacalendarview">
</manifest>

View File

@ -1,264 +0,0 @@
package com.github.tibolte.agendacalendarview;
import android.animation.Animator;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.TypedArray;
import android.os.Handler;
import androidx.annotation.NonNull;
import android.util.AttributeSet;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.AbsListView;
import android.widget.AdapterView;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.github.tibolte.agendacalendarview.agenda.AgendaAdapter;
import com.github.tibolte.agendacalendarview.agenda.AgendaView;
import com.github.tibolte.agendacalendarview.calendar.CalendarView;
import com.github.tibolte.agendacalendarview.models.BaseCalendarEvent;
import com.github.tibolte.agendacalendarview.models.CalendarEvent;
import com.github.tibolte.agendacalendarview.models.DayItem;
import com.github.tibolte.agendacalendarview.models.IDayItem;
import com.github.tibolte.agendacalendarview.models.IWeekItem;
import com.github.tibolte.agendacalendarview.models.WeekItem;
import com.github.tibolte.agendacalendarview.render.DefaultEventRenderer;
import com.github.tibolte.agendacalendarview.render.EventRenderer;
import com.github.tibolte.agendacalendarview.utils.BusProvider;
import com.github.tibolte.agendacalendarview.utils.Events;
import com.github.tibolte.agendacalendarview.utils.ListViewScrollTracker;
import com.github.tibolte.agendacalendarview.widgets.FloatingActionButton;
import java.util.Calendar;
import java.util.List;
import java.util.Locale;
import se.emilsjolander.stickylistheaders.StickyListHeadersListView;
/**
* View holding the agenda and calendar view together.
*/
public class AgendaCalendarView extends FrameLayout implements StickyListHeadersListView.OnStickyHeaderChangedListener {
private static final String LOG_TAG = AgendaCalendarView.class.getSimpleName();
private CalendarView mCalendarView;
private AgendaView mAgendaView;
private FloatingActionButton mFloatingActionButton;
private int mAgendaCurrentDayTextColor, mCalendarHeaderColor, mCalendarHeaderTextColor, mCalendarBackgroundColor, mCalendarDayTextColor, mCalendarPastDayTextColor, mCalendarCurrentDayColor, mFabColor;
private CalendarPickerController mCalendarPickerController;
public AgendaView getAgendaView() {
return mAgendaView;
}
private ListViewScrollTracker mAgendaListViewScrollTracker;
private AbsListView.OnScrollListener mAgendaScrollListener = new AbsListView.OnScrollListener() {
int mCurrentAngle;
int mMaxAngle = 85;
@Override
public void onScrollStateChanged(AbsListView view, int scrollState) {
}
@Override
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
int scrollY = mAgendaListViewScrollTracker.calculateScrollY(firstVisibleItem, visibleItemCount);
if (scrollY != 0) {
mFloatingActionButton.show();
}
//Log.d(LOG_TAG, String.format("Agenda listView scrollY: %d", scrollY));
/*int toAngle = scrollY / 100;
if (toAngle > mMaxAngle) {
toAngle = mMaxAngle;
} else if (toAngle < -mMaxAngle) {
toAngle = -mMaxAngle;
}
RotateAnimation rotate = new RotateAnimation(mCurrentAngle, toAngle, mFloatingActionButton.getWidth() / 2, mFloatingActionButton.getHeight() / 2);
rotate.setFillAfter(true);
mCurrentAngle = toAngle;
mFloatingActionButton.startAnimation(rotate);*/
}
};
// region Constructors
public AgendaCalendarView(Context context) {
super(context);
}
public AgendaCalendarView(Context context, AttributeSet attrs) {
super(context, attrs);
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ColorOptionsView, 0, 0);
mAgendaCurrentDayTextColor = a.getColor(R.styleable.ColorOptionsView_agendaCurrentDayTextColor, getResources().getColor(R.color.theme_primary));
mCalendarHeaderColor = a.getColor(R.styleable.ColorOptionsView_calendarHeaderColor, getResources().getColor(R.color.theme_primary_dark));
mCalendarHeaderTextColor = a.getColor(R.styleable.ColorOptionsView_calendarHeaderTextColor, getResources().getColor(R.color.theme_text_icons));
mCalendarBackgroundColor = a.getColor(R.styleable.ColorOptionsView_calendarColor, getResources().getColor(R.color.theme_primary));
mCalendarDayTextColor = a.getColor(R.styleable.ColorOptionsView_calendarDayTextColor, getResources().getColor(R.color.theme_text_icons));
mCalendarCurrentDayColor = a.getColor(R.styleable.ColorOptionsView_calendarCurrentDayTextColor, getResources().getColor(R.color.calendar_text_current_day));
mCalendarPastDayTextColor = a.getColor(R.styleable.ColorOptionsView_calendarPastDayTextColor, getResources().getColor(R.color.theme_light_primary));
mFabColor = a.getColor(R.styleable.ColorOptionsView_fabColor, getResources().getColor(R.color.theme_accent));
LayoutInflater inflater = (LayoutInflater) context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
inflater.inflate(R.layout.view_agendacalendar, this, true);
setAlpha(0f);
}
// endregion
// region Class - View
@Override
protected void onFinishInflate() {
super.onFinishInflate();
mCalendarView = (CalendarView) findViewById(R.id.calendar_view);
mAgendaView = (AgendaView) findViewById(R.id.agenda_view);
mFloatingActionButton = (FloatingActionButton) findViewById(R.id.floating_action_button);
ColorStateList csl = new ColorStateList(new int[][]{new int[0]}, new int[]{mFabColor});
mFloatingActionButton.setBackgroundTintList(csl);
LinearLayout mDayNamesHeader = mCalendarView.findViewById(R.id.cal_day_names);
mDayNamesHeader.setBackgroundColor(mCalendarHeaderColor);
for (int i = 0; i < mDayNamesHeader.getChildCount(); i++) {
TextView txtDay = (TextView) mDayNamesHeader.getChildAt(i);
txtDay.setTextColor(mCalendarHeaderTextColor);
}
mCalendarView.findViewById(R.id.list_week).setBackgroundColor(mCalendarBackgroundColor);
mAgendaView.getAgendaListView().setOnItemClickListener((AdapterView<?> parent, View view, int position, long id) -> {
mCalendarPickerController.onEventSelected(CalendarManager.getInstance().getEvents().get(position));
});
BusProvider.getInstance().toObserverable()
.subscribe(event -> {
if (event instanceof Events.DayClickedEvent) {
if (mCalendarPickerController != null)
mCalendarPickerController.onDaySelected(((Events.DayClickedEvent) event).getDay());
} else if (event instanceof Events.EventsFetched) {
ObjectAnimator alphaAnimation = ObjectAnimator.ofFloat(this, "alpha", getAlpha(), 1f).setDuration(500);
alphaAnimation.addListener(new Animator.AnimatorListener() {
@Override
public void onAnimationStart(Animator animation) {
}
@Override
public void onAnimationEnd(Animator animation) {
long fabAnimationDelay = 500;
// Just after setting the alpha from this view to 1, we hide the fab.
// It will reappear as soon as the user is scrolling the Agenda view.
new Handler().postDelayed(() -> {
mFloatingActionButton.hide();
mAgendaListViewScrollTracker = new ListViewScrollTracker(mAgendaView.getAgendaListView());
mAgendaView.getAgendaListView().setOnScrollListener(mAgendaScrollListener);
mFloatingActionButton.setOnClickListener((v) -> {
mAgendaView.translateList(0);
mAgendaView.getAgendaListView().smoothScrollBy(0, 0);
//mAgendaView.getAgendaListView().getWrappedList().smoothScrollBy(0, 0);
mAgendaView.getAgendaListView().scrollToCurrentDate(CalendarManager.getInstance().getToday());
new Handler().postDelayed(() -> mFloatingActionButton.hide(), fabAnimationDelay);
});
}, fabAnimationDelay);
}
@Override
public void onAnimationCancel(Animator animation) {
}
@Override
public void onAnimationRepeat(Animator animation) {
}
});
alphaAnimation.start();
}
});
}
// endregion
// region Interface - StickyListHeadersListView.OnStickyHeaderChangedListener
@Override
public void onStickyHeaderChanged(StickyListHeadersListView stickyListHeadersListView, View header, int position, long headerId) {
//Log.d(LOG_TAG, String.format("onStickyHeaderChanged, position = %d, headerId = %d", position, headerId));
if (CalendarManager.getInstance().getEvents().size() > 0) {
CalendarEvent event = CalendarManager.getInstance().getEvents().get(position);
if (event != null) {
mCalendarView.scrollToDate(event);
mCalendarPickerController.onScrollToDate(event.getInstanceDay());
}
}
}
// endregion
// region Public methods
public void init(List<CalendarEvent> eventList, Calendar minDate, Calendar maxDate, Locale locale, CalendarPickerController calendarPickerController, EventRenderer<?> ... renderers) {
mCalendarPickerController = calendarPickerController;
CalendarManager.getInstance(getContext()).buildCal(minDate, maxDate, locale, new DayItem(), new WeekItem());
// Feed our views with weeks list and events
mCalendarView.init(CalendarManager.getInstance(getContext()), mCalendarDayTextColor, mCalendarCurrentDayColor, mCalendarPastDayTextColor, eventList);
// Load agenda events and scroll to current day
AgendaAdapter agendaAdapter = new AgendaAdapter(mAgendaCurrentDayTextColor);
mAgendaView.getAgendaListView().setAdapter(agendaAdapter);
mAgendaView.getAgendaListView().setOnStickyHeaderChangedListener(this);
CalendarManager.getInstance().loadEvents(eventList, new BaseCalendarEvent());
BusProvider.getInstance().send(new Events.EventsFetched());
Log.d(LOG_TAG, "CalendarEventTask finished, event count "+eventList.size());
// add default event renderer
addEventRenderer(new DefaultEventRenderer());
for (EventRenderer<?> renderer: renderers) {
addEventRenderer(renderer);
}
}
public void init(Locale locale, List<IWeekItem> lWeeks, List<IDayItem> lDays, List<CalendarEvent> lEvents, CalendarPickerController calendarPickerController) {
mCalendarPickerController = calendarPickerController;
CalendarManager.getInstance(getContext()).loadCal(locale, lWeeks, lDays, lEvents);
// Feed our views with weeks list and events
mCalendarView.init(CalendarManager.getInstance(getContext()), mCalendarDayTextColor, mCalendarCurrentDayColor, mCalendarPastDayTextColor, lEvents);
// Load agenda events and scroll to current day
AgendaAdapter agendaAdapter = new AgendaAdapter(mAgendaCurrentDayTextColor);
mAgendaView.getAgendaListView().setAdapter(agendaAdapter);
mAgendaView.getAgendaListView().setOnStickyHeaderChangedListener(this);
// notify that actually everything is loaded
BusProvider.getInstance().send(new Events.EventsFetched());
Log.d(LOG_TAG, "CalendarEventTask finished");
// add default event renderer
addEventRenderer(new DefaultEventRenderer());
}
public void addEventRenderer(@NonNull final EventRenderer<?> renderer) {
AgendaAdapter adapter = (AgendaAdapter) mAgendaView.getAgendaListView().getAdapter();
adapter.addEventRenderer(renderer);
}
public void enableFloatingIndicator(boolean enable) {
mFloatingActionButton.setVisibility(enable ? VISIBLE : GONE);
}
// endregion
}

View File

@ -1,267 +0,0 @@
package com.github.tibolte.agendacalendarview;
import com.github.tibolte.agendacalendarview.models.CalendarEvent;
import com.github.tibolte.agendacalendarview.models.IDayItem;
import com.github.tibolte.agendacalendarview.models.IWeekItem;
import com.github.tibolte.agendacalendarview.utils.DateHelper;
import android.content.Context;
import android.util.Log;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Locale;
/**
* This class manages information about the calendar. (Events, weather info...)
* Holds reference to the days list of the calendar.
* As the app is using several views, we want to keep everything in one place.
*/
public class CalendarManager {
private static final String LOG_TAG = CalendarManager.class.getSimpleName();
private static CalendarManager mInstance;
private Context mContext;
private Locale mLocale;
private Calendar mToday = Calendar.getInstance();
private SimpleDateFormat mWeekdayFormatter;
private SimpleDateFormat mMonthHalfNameFormat;
/// instances of classes provided from outside
private IDayItem mCleanDay;
private IWeekItem mCleanWeek;
/**
* List of days used by the calendar
*/
private List<IDayItem> mDays = new ArrayList<>();
/**
* List of weeks used by the calendar
*/
private List<IWeekItem> mWeeks = new ArrayList<>();
/**
* List of events instances
*/
private List<CalendarEvent> mEvents = new ArrayList<>();
// region Constructors
public CalendarManager(Context context) {
this.mContext = context;
}
public static CalendarManager getInstance(Context context) {
if (mInstance == null) {
mInstance = new CalendarManager(context);
}
return mInstance;
}
public static CalendarManager getInstance() {
return mInstance;
}
// endregion
// region Getters/Setters
public Locale getLocale() {
return mLocale;
}
public Context getContext() {
return mContext;
}
public Calendar getToday() {
return mToday;
}
public void setToday(Calendar today) {
this.mToday = today;
}
public List<IWeekItem> getWeeks() {
return mWeeks;
}
public List<CalendarEvent> getEvents() {
return mEvents;
}
public List<IDayItem> getDays() {
return mDays;
}
public SimpleDateFormat getWeekdayFormatter() {
return mWeekdayFormatter;
}
public SimpleDateFormat getMonthHalfNameFormat() {
return mMonthHalfNameFormat;
}
// endregion
// region Public methods
public void buildCal(Calendar minDate, Calendar maxDate, Locale locale, IDayItem cleanDay, IWeekItem cleanWeek) {
if (minDate == null || maxDate == null) {
throw new IllegalArgumentException(
"minDate and maxDate must be non-null.");
}
if (minDate.after(maxDate)) {
throw new IllegalArgumentException(
"minDate must be before maxDate.");
}
if (locale == null) {
throw new IllegalArgumentException("Locale is null.");
}
setLocale(locale);
mDays.clear();
mWeeks.clear();
mEvents.clear();
mCleanDay = cleanDay;
mCleanWeek = cleanWeek;
Calendar mMinCal = Calendar.getInstance(mLocale);
Calendar mMaxCal = Calendar.getInstance(mLocale);
Calendar mWeekCounter = Calendar.getInstance(mLocale);
mMinCal.setTime(minDate.getTime());
mMaxCal.setTime(maxDate.getTime());
// maxDate is exclusive, here we bump back to the previous day, as maxDate if December 1st, 2020,
// we don't include that month in our list
mMaxCal.add(Calendar.MINUTE, -1);
// Now iterate we iterate between mMinCal and mMaxCal so we build our list of weeks
mWeekCounter.setTime(mMinCal.getTime());
int maxMonth = mMaxCal.get(Calendar.MONTH);
int maxYear = mMaxCal.get(Calendar.YEAR);
int currentMonth = mWeekCounter.get(Calendar.MONTH);
int currentYear = mWeekCounter.get(Calendar.YEAR);
// Loop through the weeks
while ((currentMonth <= maxMonth // Up to, including the month.
|| currentYear < maxYear) // Up to the year.
&& currentYear < maxYear + 1) { // But not > next yr.
Date date = mWeekCounter.getTime();
// Build our week list
int currentWeekOfYear = mWeekCounter.get(Calendar.WEEK_OF_YEAR);
IWeekItem weekItem = cleanWeek.copy();
weekItem.setWeekInYear(currentWeekOfYear);
weekItem.setYear(currentYear);
weekItem.setDate(date);
weekItem.setMonth(currentMonth);
weekItem.setLabel(mMonthHalfNameFormat.format(date));
List<IDayItem> dayItems = getDayCells(mWeekCounter); // gather days for the built week
weekItem.setDayItems(dayItems);
mWeeks.add(weekItem);
//Log.d(LOG_TAG, String.format("Adding week: %s", weekItem));
mWeekCounter.add(Calendar.WEEK_OF_YEAR, 1);
currentMonth = mWeekCounter.get(Calendar.MONTH);
currentYear = mWeekCounter.get(Calendar.YEAR);
}
}
public void loadEvents(List<CalendarEvent> eventList, CalendarEvent noEvent) {
for (IWeekItem weekItem : getWeeks()) {
for (IDayItem dayItem : weekItem.getDayItems()) {
boolean isEventForDay = false;
boolean isShowBadgeForDay = false;
for (CalendarEvent event : eventList) {
if (DateHelper.isBetweenInclusive(dayItem.getDate(), event.getStartTime(), event.getEndTime())) {
CalendarEvent copy = event.copy();
if (copy.getShowBadge()) {
isShowBadgeForDay = true;
}
Calendar dayInstance = Calendar.getInstance();
dayInstance.setTime(dayItem.getDate());
copy.setInstanceDay(dayInstance);
copy.setDayReference(dayItem);
copy.setWeekReference(weekItem);
// add instances in chronological order
getEvents().add(copy);
isEventForDay = true;
}
}
if (!isEventForDay) {
Calendar dayInstance = Calendar.getInstance();
dayInstance.setTime(dayItem.getDate());
CalendarEvent copy = noEvent.copy();
copy.setInstanceDay(dayInstance);
copy.setDayReference(dayItem);
copy.setWeekReference(weekItem);
copy.setLocation("");
copy.setTitle(getContext().getResources().getString(R.string.agenda_event_no_events));
copy.setPlaceholder(true);
getEvents().add(copy);
}
dayItem.setShowBadge(isShowBadgeForDay);
}
}
}
public void loadCal (Locale locale, List<IWeekItem> lWeeks, List<IDayItem> lDays, List<CalendarEvent> lEvents) {
mWeeks = lWeeks;
mDays = lDays;
mEvents = lEvents;
setLocale(locale);
}
// endregion
// region Private methods
private List<IDayItem> getDayCells(Calendar startCal) {
Calendar cal = Calendar.getInstance(mLocale);
cal.setTime(startCal.getTime());
List<IDayItem> dayItems = new ArrayList<>();
int firstDayOfWeek = cal.get(Calendar.DAY_OF_WEEK);
int offset = cal.getFirstDayOfWeek() - firstDayOfWeek;
if (offset > 0) {
offset -= 7;
}
cal.add(Calendar.DATE, offset);
//Log.d(LOG_TAG, String.format("Buiding row week starting at %s", cal.getTime()));
for (int c = 0; c < 7; c++) {
IDayItem dayItem = mCleanDay.copy();
dayItem.buildDayItemFromCal(cal);
dayItems.add(dayItem);
cal.add(Calendar.DATE, 1);
}
mDays.addAll(dayItems);
return dayItems;
}
private void setLocale(Locale locale) {
this.mLocale = locale;
setToday(Calendar.getInstance(mLocale));
mWeekdayFormatter = new SimpleDateFormat(getContext().getString(R.string.day_name_format), mLocale);
mMonthHalfNameFormat = new SimpleDateFormat(getContext().getString(R.string.month_half_name_format), locale);
}
// endregion
}

View File

@ -1,14 +0,0 @@
package com.github.tibolte.agendacalendarview;
import com.github.tibolte.agendacalendarview.models.CalendarEvent;
import com.github.tibolte.agendacalendarview.models.IDayItem;
import java.util.Calendar;
public interface CalendarPickerController {
void onDaySelected(IDayItem dayItem);
void onEventSelected(CalendarEvent event);
void onScrollToDate(Calendar calendar);
}

View File

@ -1,105 +0,0 @@
package com.github.tibolte.agendacalendarview.agenda;
import com.github.tibolte.agendacalendarview.models.CalendarEvent;
import com.github.tibolte.agendacalendarview.render.DefaultEventRenderer;
import com.github.tibolte.agendacalendarview.render.EventRenderer;
import androidx.annotation.NonNull;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import java.util.ArrayList;
import java.util.List;
import se.emilsjolander.stickylistheaders.StickyListHeadersAdapter;
/**
* Adapter for the agenda, implements StickyListHeadersAdapter.
* Days as sections and CalendarEvents as list items.
*/
public class AgendaAdapter extends BaseAdapter implements StickyListHeadersAdapter {
private List<CalendarEvent> mEvents = new ArrayList<>();
private List<EventRenderer<?>> mRenderers = new ArrayList<>();
private int mCurrentDayColor;
// region Constructor
public AgendaAdapter(int currentDayTextColor) {
this.mCurrentDayColor = currentDayTextColor;
}
// endregion
// region Public methods
public void updateEvents(List<CalendarEvent> events) {
this.mEvents.clear();
this.mEvents.addAll(events);
notifyDataSetChanged();
}
// endregion
// region Interface - StickyListHeadersAdapter
@Override
public View getHeaderView(int position, View convertView, ViewGroup parent) {
AgendaHeaderView agendaHeaderView = (AgendaHeaderView) convertView;
if (agendaHeaderView == null) {
agendaHeaderView = AgendaHeaderView.inflate(parent);
}
agendaHeaderView.setDay(getItem(position).getInstanceDay(), mCurrentDayColor, getItem(position).getDayReference().getShowBadge());
return agendaHeaderView;
}
@Override
public long getHeaderId(int position) {
return mEvents.get(position).getInstanceDay().getTimeInMillis();
}
// endregion
// region Class - BaseAdapter
@Override
public int getCount() {
return mEvents.size();
}
@Override
public CalendarEvent getItem(int position) {
return mEvents.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
EventRenderer eventRenderer = new DefaultEventRenderer();
final CalendarEvent event = getItem(position);
// Search for the correct event renderer
for (EventRenderer renderer : mRenderers) {
if(event.getClass().isAssignableFrom(renderer.getRenderType())) {
eventRenderer = renderer;
break;
}
}
convertView = LayoutInflater.from(parent.getContext())
.inflate(eventRenderer.getEventLayout(), parent, false);
eventRenderer.render(convertView, event);
return convertView;
}
public void addEventRenderer(@NonNull final EventRenderer<?> renderer) {
mRenderers.add(renderer);
}
// endregion
}

View File

@ -1,38 +0,0 @@
package com.github.tibolte.agendacalendarview.agenda;
import com.github.tibolte.agendacalendarview.R;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.LinearLayout;
/**
* List item view for the StickyHeaderListView of the agenda view
*/
public class AgendaEventView extends LinearLayout {
public static AgendaEventView inflate(ViewGroup parent) {
return (AgendaEventView) LayoutInflater.from(parent.getContext()).inflate(R.layout.view_agenda_event, parent, false);
}
// region Constructors
public AgendaEventView(Context context) {
this(context, null);
}
public AgendaEventView(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public AgendaEventView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
setPadding(getResources().getDimensionPixelSize(R.dimen.agenda_event_view_padding_left),
getResources().getDimensionPixelSize(R.dimen.agenda_event_view_padding_top),
getResources().getDimensionPixelSize(R.dimen.agenda_event_view_padding_right),
getResources().getDimensionPixelSize(R.dimen.agenda_event_view_padding_bottom));
}
// endregion
}

View File

@ -1,81 +0,0 @@
package com.github.tibolte.agendacalendarview.agenda;
import com.github.tibolte.agendacalendarview.CalendarManager;
import com.github.tibolte.agendacalendarview.R;
import com.github.tibolte.agendacalendarview.utils.DateHelper;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.drawable.GradientDrawable;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;
import java.text.SimpleDateFormat;
import java.util.Calendar;
/**
* Header view for the StickyHeaderListView of the agenda view
*/
public class AgendaHeaderView extends LinearLayout {
public static AgendaHeaderView inflate(ViewGroup parent) {
return (AgendaHeaderView) LayoutInflater.from(parent.getContext()).inflate(R.layout.view_agenda_header, parent, false);
}
// region Constructors
public AgendaHeaderView(Context context) {
super(context);
}
public AgendaHeaderView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public AgendaHeaderView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
// endregion
// region Public methods
public void setDay(Calendar day, int currentDayTextColor, boolean showBadge) {
TextView txtDayOfMonth = (TextView) findViewById(R.id.view_agenda_day_of_month);
TextView txtDayOfWeek = (TextView) findViewById(R.id.view_agenda_day_of_week);
TextView txtDay = (TextView) findViewById(R.id.view_agenda_day_text);
View circleView = findViewById(R.id.view_day_circle_selected);
Calendar today = CalendarManager.getInstance().getToday();
SimpleDateFormat dayWeekFormatter = new SimpleDateFormat(getContext().getString(R.string.day_name_format), CalendarManager.getInstance().getLocale());
SimpleDateFormat dayWeekLongFormatter = new SimpleDateFormat("EEEE", CalendarManager.getInstance().getLocale());
txtDayOfMonth.setTextColor(getResources().getColor(R.color.calendar_text_default));
txtDayOfWeek.setTextColor(getResources().getColor(R.color.calendar_text_default));
if (DateHelper.sameDate(day, today)) {
txtDayOfMonth.setTextColor(currentDayTextColor);
circleView.setVisibility(VISIBLE);
GradientDrawable drawable = (GradientDrawable) circleView.getBackground();
drawable.setStroke((int) (2 * Resources.getSystem().getDisplayMetrics().density), currentDayTextColor);
} else if (showBadge) {
circleView.setVisibility(VISIBLE);
GradientDrawable drawable = (GradientDrawable) circleView.getBackground();
drawable.setStroke((int) (2 * Resources.getSystem().getDisplayMetrics().density), 0xffff0000);
}
else {
circleView.setVisibility(INVISIBLE);
}
txtDayOfMonth.setText(String.valueOf(day.get(Calendar.DAY_OF_MONTH)));
txtDayOfWeek.setText(dayWeekFormatter.format(day.getTime()));
//txtDay.setText(dayWeekLongFormatter.format(day.getTime()));
}
// endregion
}

View File

@ -1,54 +0,0 @@
package com.github.tibolte.agendacalendarview.agenda;
import com.github.tibolte.agendacalendarview.CalendarManager;
import com.github.tibolte.agendacalendarview.models.CalendarEvent;
import com.github.tibolte.agendacalendarview.utils.DateHelper;
import android.content.Context;
import android.util.AttributeSet;
import java.util.Calendar;
import java.util.List;
import se.emilsjolander.stickylistheaders.StickyListHeadersListView;
/**
* StickyListHeadersListView to scroll chronologically through events.
*/
public class AgendaListView extends StickyListHeadersListView {
// region Constructors
public AgendaListView(Context context) {
super(context);
}
public AgendaListView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public AgendaListView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
// endregion
// region Public methods
public void scrollToCurrentDate(Calendar today) {
List<CalendarEvent> events = CalendarManager.getInstance().getEvents();
int toIndex = 0;
for (int i = 0; i < events.size(); i++) {
if (DateHelper.sameDate(today, events.get(i).getInstanceDay())) {
toIndex = i;
break;
}
}
final int finalToIndex = toIndex;
post(()->setSelection(finalToIndex));
}
// endregion
}

View File

@ -1,145 +0,0 @@
package com.github.tibolte.agendacalendarview.agenda;
import android.animation.Animator;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.widget.FrameLayout;
import com.github.tibolte.agendacalendarview.CalendarManager;
import com.github.tibolte.agendacalendarview.R;
import com.github.tibolte.agendacalendarview.utils.BusProvider;
import com.github.tibolte.agendacalendarview.utils.Events;
public class AgendaView extends FrameLayout {
private AgendaListView mAgendaListView;
private View mShadowView;
// region Constructors
public AgendaView(Context context) {
super(context);
}
public AgendaView(Context context, AttributeSet attrs) {
super(context, attrs);
LayoutInflater inflater = (LayoutInflater) context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
inflater.inflate(R.layout.view_agenda, this, true);
}
// endregion
// region Class - View
@Override
protected void onFinishInflate() {
super.onFinishInflate();
mAgendaListView = (AgendaListView) findViewById(R.id.agenda_listview);
mShadowView = findViewById(R.id.view_shadow);
BusProvider.getInstance().toObserverable()
.subscribe(event -> {
if (event instanceof Events.DayClickedEvent) {
Events.DayClickedEvent clickedEvent = (Events.DayClickedEvent) event;
getAgendaListView().scrollToCurrentDate(clickedEvent.getCalendar());
} else if (event instanceof Events.CalendarScrolledEvent) {
int offset = (int) (3 * getResources().getDimension(R.dimen.day_cell_height));
translateList(offset);
} else if (event instanceof Events.EventsFetched) {
if (getAgendaListView().getAdapter() != null)
((AgendaAdapter) getAgendaListView().getAdapter()).updateEvents(CalendarManager.getInstance().getEvents());
getViewTreeObserver().addOnGlobalLayoutListener(
new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
if (getWidth() != 0 && getHeight() != 0) {
// display only two visible rows on the calendar view
ViewGroup.MarginLayoutParams layoutParams = (ViewGroup.MarginLayoutParams) getLayoutParams();
int height = getHeight();
int margin = (int) (getContext().getResources().getDimension(R.dimen.calendar_header_height) + 2 * getContext().getResources().getDimension(R.dimen.day_cell_height));
layoutParams.height = height;
layoutParams.setMargins(0, margin, 0, 0);
setLayoutParams(layoutParams);
getAgendaListView().scrollToCurrentDate(CalendarManager.getInstance().getToday());
getViewTreeObserver().removeGlobalOnLayoutListener(this);
}
}
}
);
} else if (event instanceof Events.ForecastFetched) {
((AgendaAdapter) getAgendaListView().getAdapter()).updateEvents(CalendarManager.getInstance().getEvents());
}
});
}
@Override
public boolean dispatchTouchEvent(MotionEvent event) {
int eventaction = event.getAction();
switch (eventaction) {
case MotionEvent.ACTION_DOWN:
// if the user touches the listView, we put it back to the top
translateList(0);
break;
default:
break;
}
return super.dispatchTouchEvent(event);
}
// endregion
// region Public methods
public AgendaListView getAgendaListView() {
return mAgendaListView;
}
public void translateList(int targetY) {
if (targetY != getTranslationY()) {
ObjectAnimator mover = ObjectAnimator.ofFloat(this, "translationY", targetY);
mover.setDuration(150);
mover.addListener(new Animator.AnimatorListener() {
@Override
public void onAnimationStart(Animator animation) {
//mShadowView.setVisibility(GONE);
}
@Override
public void onAnimationEnd(Animator animation) {
if (targetY == 0) {
BusProvider.getInstance().send(new Events.AgendaListViewTouchedEvent());
}
//mShadowView.setVisibility(VISIBLE);
}
@Override
public void onAnimationCancel(Animator animation) {
}
@Override
public void onAnimationRepeat(Animator animation) {
}
});
mover.start();
}
}
// endregion
}

View File

@ -1,279 +0,0 @@
package com.github.tibolte.agendacalendarview.calendar;
import com.github.tibolte.agendacalendarview.CalendarManager;
import com.github.tibolte.agendacalendarview.R;
import com.github.tibolte.agendacalendarview.calendar.weekslist.WeekListView;
import com.github.tibolte.agendacalendarview.calendar.weekslist.WeeksAdapter;
import com.github.tibolte.agendacalendarview.models.CalendarEvent;
import com.github.tibolte.agendacalendarview.models.IDayItem;
import com.github.tibolte.agendacalendarview.models.IWeekItem;
import com.github.tibolte.agendacalendarview.utils.BusProvider;
import com.github.tibolte.agendacalendarview.utils.DateHelper;
import com.github.tibolte.agendacalendarview.utils.Events;
import android.content.Context;
import androidx.recyclerview.widget.LinearLayoutManager;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.widget.LinearLayout;
import android.widget.TextView;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.List;
import java.util.Locale;
/**
* The calendar view is a freely scrolling view that allows the user to browse between days of the
* year.
*/
public class CalendarView extends LinearLayout {
private static final String LOG_TAG = CalendarView.class.getSimpleName();
/**
* Top of the calendar view layout, the week days list
*/
private LinearLayout mDayNamesHeader;
/**
* Part of the calendar view layout always visible, the weeks list
*/
private WeekListView mListViewWeeks;
/**
* The adapter for the weeks list
*/
private WeeksAdapter mWeeksAdapter;
/**
* The current highlighted day in blue
*/
private IDayItem mSelectedDay;
/**
* The current row displayed at top of the list
*/
private int mCurrentListPosition;
// region Constructors
public CalendarView(Context context) {
super(context);
}
public CalendarView(Context context, AttributeSet attrs) {
super(context, attrs);
LayoutInflater inflater = (LayoutInflater) context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
inflater.inflate(R.layout.view_calendar, this, true);
setOrientation(VERTICAL);
}
// endregion
public IDayItem getSelectedDay() {
return mSelectedDay;
}
public void setSelectedDay(IDayItem mSelectedDay) {
this.mSelectedDay = mSelectedDay;
}
public WeekListView getListViewWeeks() {
return mListViewWeeks;
}
// region Class - View
@Override
protected void onFinishInflate() {
super.onFinishInflate();
mDayNamesHeader = (LinearLayout) findViewById(R.id.cal_day_names);
mListViewWeeks = (WeekListView) findViewById(R.id.list_week);
mListViewWeeks.setLayoutManager(new LinearLayoutManager(getContext()));
mListViewWeeks.setHasFixedSize(true);
mListViewWeeks.setItemAnimator(null);
mListViewWeeks.setSnapEnabled(true);
// display only two visible rows on the calendar view
getViewTreeObserver().addOnGlobalLayoutListener(
new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
if (getWidth() != 0 && getHeight() != 0) {
collapseCalendarView();
getViewTreeObserver().removeGlobalOnLayoutListener(this);
}
}
}
);
}
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
BusProvider.getInstance().toObserverable()
.subscribe(event -> {
if (event instanceof Events.CalendarScrolledEvent) {
expandCalendarView();
} else if (event instanceof Events.AgendaListViewTouchedEvent) {
collapseCalendarView();
} else if (event instanceof Events.DayClickedEvent) {
Events.DayClickedEvent clickedEvent = (Events.DayClickedEvent) event;
updateSelectedDay(clickedEvent.getCalendar(), clickedEvent.getDay());
}
});
}
// endregion
// region Public methods
public void init(CalendarManager calendarManager, int dayTextColor, int currentDayTextColor, int pastDayTextColor, List<CalendarEvent> eventList) {
Calendar today = calendarManager.getToday();
Locale locale = calendarManager.getLocale();
SimpleDateFormat weekDayFormatter = calendarManager.getWeekdayFormatter();
List<IWeekItem> weeks = calendarManager.getWeeks();
setUpHeader(today, weekDayFormatter, locale);
setUpAdapter(today, weeks, dayTextColor, currentDayTextColor, pastDayTextColor, eventList);
scrollToDate(today, weeks);
}
/**
* Fired when the Agenda list view changes section.
*
* @param calendarEvent The event for the selected position in the agenda listview.
*/
public void scrollToDate(final CalendarEvent calendarEvent) {
mListViewWeeks.post(()->scrollToPosition(updateSelectedDay(calendarEvent.getInstanceDay(), calendarEvent.getDayReference())));
}
public void scrollToDate(Calendar today, List<IWeekItem> weeks) {
Integer currentWeekIndex = null;
for (int c = 0; c < weeks.size(); c++) {
if (DateHelper.sameWeek(today, weeks.get(c))) {
currentWeekIndex = c;
break;
}
}
if (currentWeekIndex != null) {
final Integer finalCurrentWeekIndex = currentWeekIndex;
mListViewWeeks.post(() -> scrollToPosition(finalCurrentWeekIndex));
}
}
public void setBackgroundColor(int color) {
mListViewWeeks.setBackgroundColor(color);
}
// endregion
// region Private methods
private void scrollToPosition(int targetPosition) {
LinearLayoutManager layoutManager = ((LinearLayoutManager) mListViewWeeks.getLayoutManager());
layoutManager.scrollToPosition(targetPosition);
}
private void updateItemAtPosition(int position) {
WeeksAdapter weeksAdapter = (WeeksAdapter) mListViewWeeks.getAdapter();
weeksAdapter.notifyItemChanged(position);
}
/**
* Creates a new adapter if necessary and sets up its parameters.
*/
private void setUpAdapter(Calendar today, List<IWeekItem> weeks, int dayTextColor, int currentDayTextColor, int pastDayTextColor, List<CalendarEvent> events) {
BusProvider.getInstance().toObserverable()
.subscribe(event -> {
if (event instanceof Events.EventsFetched) {
//Log.d("CalendarView", "events size "+events.size());
if (mWeeksAdapter == null) {
//Log.d(LOG_TAG, "Setting adapter with today's calendar: " + today.toString());
mWeeksAdapter = new WeeksAdapter(getContext(), today, dayTextColor, currentDayTextColor, pastDayTextColor, events);
mListViewWeeks.setAdapter(mWeeksAdapter);
}
mWeeksAdapter.updateWeeksItems(weeks);
}});
}
private void setUpHeader(Calendar today, SimpleDateFormat weekDayFormatter, Locale locale) {
int daysPerWeek = 7;
String[] dayLabels = new String[daysPerWeek];
Calendar cal = Calendar.getInstance(CalendarManager.getInstance(getContext()).getLocale());
cal.setTime(today.getTime());
int firstDayOfWeek = cal.getFirstDayOfWeek();
for (int count = 0; count < 7; count++) {
cal.set(Calendar.DAY_OF_WEEK, firstDayOfWeek + count);
if (locale.getLanguage().equals("en")) {
dayLabels[count] = weekDayFormatter.format(cal.getTime()).toUpperCase(locale);
} else {
dayLabels[count] = weekDayFormatter.format(cal.getTime());
}
}
for (int i = 0; i < mDayNamesHeader.getChildCount(); i++) {
TextView txtDay = (TextView) mDayNamesHeader.getChildAt(i);
txtDay.setText(dayLabels[i]);
}
}
private void expandCalendarView() {
ViewGroup.MarginLayoutParams layoutParams = (ViewGroup.MarginLayoutParams) getLayoutParams();
layoutParams.height = (int) (getResources().getDimension(R.dimen.calendar_header_height) + 5 * getResources().getDimension(R.dimen.day_cell_height));
setLayoutParams(layoutParams);
}
private void collapseCalendarView() {
ViewGroup.MarginLayoutParams layoutParams = (ViewGroup.MarginLayoutParams) getLayoutParams();
layoutParams.height = (int) (getResources().getDimension(R.dimen.calendar_header_height) + 2 * getResources().getDimension(R.dimen.day_cell_height));
setLayoutParams(layoutParams);
}
/**
* Update a selected cell day item.
*
* @param calendar The Calendar instance of the day selected.
* @param dayItem The DayItem information held by the cell item.
* @return The selected row of the weeks list, to be updated.
*/
private int updateSelectedDay(Calendar calendar, IDayItem dayItem) {
Integer currentWeekIndex = null;
// update highlighted/selected day
if (!dayItem.equals(getSelectedDay())) {
dayItem.setSelected(true);
if (getSelectedDay() != null) {
getSelectedDay().setSelected(false);
}
setSelectedDay(dayItem);
}
for (int c = 0; c < CalendarManager.getInstance().getWeeks().size(); c++) {
if (DateHelper.sameWeek(calendar, CalendarManager.getInstance().getWeeks().get(c))) {
currentWeekIndex = c;
break;
}
}
if (currentWeekIndex != null) {
// highlighted day has changed, update the rows concerned
if (currentWeekIndex != mCurrentListPosition) {
updateItemAtPosition(mCurrentListPosition);
}
mCurrentListPosition = currentWeekIndex;
updateItemAtPosition(currentWeekIndex);
}
return mCurrentListPosition;
}
// endregion
}

View File

@ -1,144 +0,0 @@
package com.github.tibolte.agendacalendarview.calendar.weekslist;
import com.github.tibolte.agendacalendarview.utils.BusProvider;
import com.github.tibolte.agendacalendarview.utils.Events;
import android.content.Context;
import androidx.recyclerview.widget.RecyclerView;
import android.util.AttributeSet;
import android.view.View;
public class WeekListView extends RecyclerView {
private boolean mUserScrolling = false;
private boolean mScrolling = false;
// region Constructors
public WeekListView(Context context) {
super(context);
}
public WeekListView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public WeekListView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
// endregion
// region Public methods
/**
* Enable snapping behaviour for this recyclerView
*
* @param enabled enable or disable the snapping behaviour
*/
public void setSnapEnabled(boolean enabled) {
if (enabled) {
addOnScrollListener(mScrollListener);
} else {
removeOnScrollListener(mScrollListener);
}
}
// endregion
// region Private methods
private OnScrollListener mScrollListener = new OnScrollListener() {
@Override
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
super.onScrolled(recyclerView, dx, dy);
}
@Override
public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
super.onScrollStateChanged(recyclerView, newState);
final WeeksAdapter weeksAdapter = (WeeksAdapter) getAdapter();
switch (newState) {
case SCROLL_STATE_IDLE:
if (mUserScrolling) {
scrollToView(getCenterView());
postDelayed(() -> weeksAdapter.setDragging(false), 700); // Wait for recyclerView to settle
}
mUserScrolling = false;
mScrolling = false;
break;
// If scroll is caused by a touch (scroll touch, not any touch)
case SCROLL_STATE_DRAGGING:
BusProvider.getInstance().send(new Events.CalendarScrolledEvent());
// If scroll was initiated already, this is not a user scrolling, but probably a tap, else set userScrolling
if (!mScrolling) {
mUserScrolling = true;
}
weeksAdapter.setDragging(true);
break;
case SCROLL_STATE_SETTLING:
// The user's finger is not touching the list anymore, no need
// for any alpha animation then
weeksAdapter.setAlphaSet(true);
mScrolling = true;
break;
}
}
};
private View getChildClosestToPosition(int y) {
if (getChildCount() <= 0) {
return null;
}
int itemHeight = getChildAt(0).getMeasuredHeight();
int closestY = 9999;
View closestChild = null;
for (int i = 0; i < getChildCount(); i++) {
View child = getChildAt(i);
int childCenterY = ((int) child.getY() + (itemHeight / 2));
int yDistance = childCenterY - y;
// If child center is closer than previous closest, set it as closest
if (Math.abs(yDistance) < Math.abs(closestY)) {
closestY = yDistance;
closestChild = child;
}
}
return closestChild;
}
private View getCenterView() {
return getChildClosestToPosition(getMeasuredHeight() / 2);
}
private void scrollToView(View child) {
if (child == null) {
return;
}
stopScroll();
int scrollDistance = getScrollDistance(child);
if (scrollDistance != 0) {
smoothScrollBy(0, scrollDistance);
}
}
private int getScrollDistance(View child) {
int itemHeight = getChildAt(0).getMeasuredHeight();
int centerY = getMeasuredHeight() / 2;
int childCenterY = ((int) child.getY() + (itemHeight / 2));
return childCenterY - centerY;
}
// endregion
}

View File

@ -1,321 +0,0 @@
package com.github.tibolte.agendacalendarview.calendar.weekslist;
import com.github.tibolte.agendacalendarview.CalendarManager;
import com.github.tibolte.agendacalendarview.R;
import com.github.tibolte.agendacalendarview.models.CalendarEvent;
import com.github.tibolte.agendacalendarview.models.IDayItem;
import com.github.tibolte.agendacalendarview.models.IWeekItem;
import com.github.tibolte.agendacalendarview.utils.BusProvider;
import com.github.tibolte.agendacalendarview.utils.DateHelper;
import com.github.tibolte.agendacalendarview.utils.Events;
import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffColorFilter;
import android.graphics.Typeface;
import android.graphics.drawable.GradientDrawable;
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.TextView;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
public class WeeksAdapter extends RecyclerView.Adapter<WeeksAdapter.WeekViewHolder> {
public static final long FADE_DURATION = 250;
private Context mContext;
private Calendar mToday;
private List<IWeekItem> mWeeksList = new ArrayList<>();
private List<CalendarEvent> mEventList = new ArrayList<>();
private boolean mDragging;
private boolean mAlphaSet;
private int mDayTextColor, mPastDayTextColor, mCurrentDayColor;
// region Constructor
public WeeksAdapter(Context context, Calendar today, int dayTextColor, int currentDayTextColor, int pastDayTextColor, List<CalendarEvent> events) {
this.mToday = today;
this.mContext = context;
this.mDayTextColor = dayTextColor;
this.mCurrentDayColor = currentDayTextColor;
this.mPastDayTextColor = pastDayTextColor;
this.mEventList = events;
}
// endregion
public void updateWeeksItems(List<IWeekItem> weekItems) {
this.mWeeksList.clear();
this.mWeeksList.addAll(weekItems);
notifyDataSetChanged();
}
// region Getters/setters
public List<IWeekItem> getWeeksList() {
return mWeeksList;
}
public boolean isDragging() {
return mDragging;
}
public void setDragging(boolean dragging) {
if (dragging != this.mDragging) {
this.mDragging = dragging;
notifyItemRangeChanged(0, mWeeksList.size());
}
}
public boolean isAlphaSet() {
return mAlphaSet;
}
public void setAlphaSet(boolean alphaSet) {
mAlphaSet = alphaSet;
}
// endregion
// region RecyclerView.Adapter<WeeksAdapter.WeekViewHolder> methods
@Override
public WeekViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_item_week, parent, false);
return new WeekViewHolder(view);
}
@Override
public void onBindViewHolder(WeekViewHolder weekViewHolder, int position) {
IWeekItem weekItem = mWeeksList.get(position);
weekViewHolder.bindWeek(weekItem, mToday);
}
@Override
public int getItemCount() {
return mWeeksList.size();
}
// endregion
// region Class - WeekViewHolder
public class WeekViewHolder extends RecyclerView.ViewHolder {
/**
* List of layout containers for each day
*/
private List<LinearLayout> mCells;
private TextView mTxtMonth;
private FrameLayout mMonthBackground;
public WeekViewHolder(View itemView) {
super(itemView);
mTxtMonth = (TextView) itemView.findViewById(R.id.month_label);
mMonthBackground = (FrameLayout) itemView.findViewById(R.id.month_background);
LinearLayout daysContainer = (LinearLayout) itemView.findViewById(R.id.week_days_container);
setUpChildren(daysContainer);
}
public void bindWeek(IWeekItem weekItem, Calendar today) {
setUpMonthOverlay();
List<IDayItem> dayItems = weekItem.getDayItems();
for (int c = 0; c < dayItems.size(); c++) {
final IDayItem dayItem = dayItems.get(c);
LinearLayout cellItem = mCells.get(c);
TextView txtDay = (TextView) cellItem.findViewById(R.id.view_day_day_label);
TextView txtMonth = (TextView) cellItem.findViewById(R.id.view_day_month_label);
View circleView = cellItem.findViewById(R.id.view_day_circle_selected);
View eventIndicator1 = cellItem.findViewById(R.id.view_day_event_indicator1);
View eventIndicator2 = cellItem.findViewById(R.id.view_day_event_indicator2);
View eventIndicator3 = cellItem.findViewById(R.id.view_day_event_indicator3);
cellItem.setOnClickListener(v->BusProvider.getInstance().send(new Events.DayClickedEvent(dayItem)));
eventIndicator1.setVisibility(View.INVISIBLE);
eventIndicator2.setVisibility(View.INVISIBLE);
eventIndicator3.setVisibility(View.INVISIBLE);
Calendar dayItemCalendar = Calendar.getInstance();
dayItemCalendar.setTime(dayItem.getDate());
int eventCount = 0;
for (CalendarEvent event: mEventList) {
if (event.getStartTime().get(Calendar.YEAR) == dayItemCalendar.get(Calendar.YEAR)
&& event.getStartTime().get(Calendar.MONTH) == dayItemCalendar.get(Calendar.MONTH)
&& event.getStartTime().get(Calendar.DAY_OF_MONTH) == dayItemCalendar.get(Calendar.DAY_OF_MONTH)) {
eventCount++;
if (eventCount == 1) {
eventIndicator1.setVisibility(View.VISIBLE);
eventIndicator1.getBackground().setColorFilter(new PorterDuffColorFilter(event.getColor(),PorterDuff.Mode.MULTIPLY));
}
if (eventCount == 2) {
eventIndicator2.setVisibility(View.VISIBLE);
eventIndicator2.getBackground().setColorFilter(new PorterDuffColorFilter(event.getColor(),PorterDuff.Mode.MULTIPLY));
}
if (eventCount == 3) {
eventIndicator3.setVisibility(View.VISIBLE);
eventIndicator3.getBackground().setColorFilter(new PorterDuffColorFilter(event.getColor(),PorterDuff.Mode.MULTIPLY));
}
}
}
//Log.d("CalendarView", "Event count for day "+dayItem.getValue()+" is "+eventCount);
txtMonth.setVisibility(View.GONE);
txtDay.setTextColor(mDayTextColor);
txtMonth.setTextColor(mDayTextColor);
circleView.setVisibility(View.GONE);
txtDay.setTypeface(null, Typeface.NORMAL);
txtMonth.setTypeface(null, Typeface.NORMAL);
// Display the day
txtDay.setText(Integer.toString(dayItem.getValue()));
// Highlight first day of the month
if (dayItem.isFirstDayOfTheMonth() && !dayItem.isSelected()) {
txtMonth.setVisibility(View.VISIBLE);
txtMonth.setText(dayItem.getMonth());
txtDay.setTypeface(null, Typeface.BOLD);
txtMonth.setTypeface(null, Typeface.BOLD);
}
// Check if this day is in the past
if (today.getTime().after(dayItem.getDate()) && !DateHelper.sameDate(today, dayItem.getDate())) {
txtDay.setTextColor(mPastDayTextColor);
txtMonth.setTextColor(mPastDayTextColor);
}
// Highlight the cell if this day is today
if (dayItem.isToday() && !dayItem.isSelected()) {
txtDay.setTextColor(mCurrentDayColor);
}
if (dayItem.getShowBadge()) {
circleView.setVisibility(View.VISIBLE);
GradientDrawable drawable = (GradientDrawable) circleView.getBackground();
drawable.setStroke((int) (2 * Resources.getSystem().getDisplayMetrics().density), 0xffff0000);
}
// Show a circle if the day is selected
if (dayItem.isSelected()) {
txtDay.setTextColor(mDayTextColor);
circleView.setVisibility(View.VISIBLE);
GradientDrawable drawable = (GradientDrawable) circleView.getBackground();
drawable.setStroke((int) (1 * Resources.getSystem().getDisplayMetrics().density), mDayTextColor);
}
// Check if the month label has to be displayed
if (dayItem.getValue() == 15) {
mTxtMonth.setVisibility(View.VISIBLE);
SimpleDateFormat monthDateFormat = new SimpleDateFormat(mContext.getResources().getString(R.string.month_name_format), CalendarManager.getInstance().getLocale());
String month = monthDateFormat.format(weekItem.getDate()).toUpperCase();
if (today.get(Calendar.YEAR) != weekItem.getYear()) {
month = month + String.format(" %d", weekItem.getYear());
}
mTxtMonth.setText(month);
}
}
}
private void setUpChildren(LinearLayout daysContainer) {
mCells = new ArrayList<>();
for (int i = 0; i < daysContainer.getChildCount(); i++) {
mCells.add((LinearLayout) daysContainer.getChildAt(i));
}
}
private void setUpMonthOverlay() {
mTxtMonth.setVisibility(View.GONE);
if (isDragging()) {
AnimatorSet animatorSetFadeIn = new AnimatorSet();
animatorSetFadeIn.setDuration(FADE_DURATION);
ObjectAnimator animatorTxtAlphaIn = ObjectAnimator.ofFloat(mTxtMonth, "alpha", mTxtMonth.getAlpha(), 1f);
ObjectAnimator animatorBackgroundAlphaIn = ObjectAnimator.ofFloat(mMonthBackground, "alpha", mMonthBackground.getAlpha(), 1f);
animatorSetFadeIn.playTogether(
animatorTxtAlphaIn
//animatorBackgroundAlphaIn
);
animatorSetFadeIn.addListener(new Animator.AnimatorListener() {
@Override
public void onAnimationStart(Animator animation) {
}
@Override
public void onAnimationEnd(Animator animation) {
setAlphaSet(true);
}
@Override
public void onAnimationCancel(Animator animation) {
}
@Override
public void onAnimationRepeat(Animator animation) {
}
});
animatorSetFadeIn.start();
} else {
AnimatorSet animatorSetFadeOut = new AnimatorSet();
animatorSetFadeOut.setDuration(FADE_DURATION);
ObjectAnimator animatorTxtAlphaOut = ObjectAnimator.ofFloat(mTxtMonth, "alpha", mTxtMonth.getAlpha(), 0f);
ObjectAnimator animatorBackgroundAlphaOut = ObjectAnimator.ofFloat(mMonthBackground, "alpha", mMonthBackground.getAlpha(), 0f);
animatorSetFadeOut.playTogether(
animatorTxtAlphaOut
//animatorBackgroundAlphaOut
);
animatorSetFadeOut.addListener(new Animator.AnimatorListener() {
@Override
public void onAnimationStart(Animator animation) {
}
@Override
public void onAnimationEnd(Animator animation) {
setAlphaSet(false);
}
@Override
public void onAnimationCancel(Animator animation) {
}
@Override
public void onAnimationRepeat(Animator animation) {
}
});
animatorSetFadeOut.start();
}
if (isAlphaSet()) {
//mMonthBackground.setAlpha(1f);
mTxtMonth.setAlpha(1f);
} else {
//mMonthBackground.setAlpha(0f);
mTxtMonth.setAlpha(0f);
}
}
}
// endregion
}

View File

@ -1,345 +0,0 @@
package com.github.tibolte.agendacalendarview.models;
import java.util.Calendar;
/**
* Event model class containing the information to be displayed on the agenda view.
*/
public class BaseCalendarEvent implements CalendarEvent {
/**
* Id of the event.
*/
private long mId;
/**
* Color to be displayed in the agenda view.
*/
private int mColor;
/**
* Text color displayed on the background color
*/
private int mTextColor;
/**
* Title of the event.
*/
private String mTitle;
/**
* Description of the event.
*/
private String mDescription;
/**
* Where the event takes place.
*/
private String mLocation;
/**
* Calendar instance helping sorting the events per section in the agenda view.
*/
private Calendar mInstanceDay;
/**
* Start time of the event.
*/
private Calendar mStartTime;
/**
* End time of the event.
*/
private Calendar mEndTime;
/**
* Indicates if the event lasts all day.
*/
private boolean mAllDay;
/**
* Tells if this BaseCalendarEvent instance is used as a placeholder in the agenda view, if there's
* no event for that day.
*/
private boolean mPlaceHolder;
/**
* Tells if this BaseCalendarEvent instance is used as a forecast information holder in the agenda
* view.
*/
private boolean mWeather;
/**
* Duration of the event.
*/
private String mDuration;
/**
* References to a DayItem instance for that event, used to link interaction between the
* calendar view and the agenda view.
*/
private IDayItem mDayReference;
/**
* References to a WeekItem instance for that event, used to link interaction between the
* calendar view and the agenda view.
*/
private IWeekItem mWeekReference;
/**
* Weather icon string returned by the Dark Sky API.
*/
private String mWeatherIcon;
/**
* Temperature value returned by the Dark Sky API.
*/
private double mTemperature;
private boolean mShowBadge;
// region Constructor
/**
* Initializes the event
*
* @param id The id of the event.
* @param color The color of the event.
* @param textColor The color of the event description text.
* @param title The title of the event.
* @param description The description of the event.
* @param location The location of the event.
* @param dateStart The start date of the event.
* @param dateEnd The end date of the event.
* @param allDay Int that can be equal to 0 or 1.
* @param duration The duration of the event in RFC2445 format.
*/
public BaseCalendarEvent(long id, int color, int textColor, String title, String description, String location, long dateStart, long dateEnd, int allDay, String duration) {
this.mId = id;
this.mColor = color;
this.mTextColor = textColor;
this.mAllDay = (allDay == 1);
this.mDuration = duration;
this.mTitle = title;
this.mDescription = description;
this.mLocation = location;
this.mStartTime = Calendar.getInstance();
this.mStartTime.setTimeInMillis(dateStart);
this.mEndTime = Calendar.getInstance();
this.mEndTime.setTimeInMillis(dateEnd);
}
public BaseCalendarEvent() {
}
/**
* Initializes the event
* @param title The title of the event.
* @param description The description of the event.
* @param location The location of the event.
* @param color The color of the event (for display in the app).
* @param textColor The color of the event description text.
* @param startTime The start time of the event.
* @param endTime The end time of the event.
* @param allDay Indicates if the event lasts the whole day.
*/
public BaseCalendarEvent(String title, String description, String location, int color, int textColor, Calendar startTime, Calendar endTime, boolean allDay) {
this.mTitle = title;
this.mDescription = description;
this.mLocation = location;
this.mColor = color;
this.mTextColor = textColor;
this.mStartTime = startTime;
this.mEndTime = endTime;
this.mAllDay = allDay;
}
public BaseCalendarEvent(String title, String description, String location, int color, int textColor, Calendar startTime, Calendar endTime, boolean allDay, long id, boolean showBadge) {
this.mTitle = title;
this.mDescription = description;
this.mLocation = location;
this.mColor = color;
this.mTextColor = textColor;
this.mStartTime = startTime;
this.mEndTime = endTime;
this.mAllDay = allDay;
this.mId = id;
this.mShowBadge = showBadge;
}
public BaseCalendarEvent(BaseCalendarEvent calendarEvent) {
this.mId = calendarEvent.getId();
this.mColor = calendarEvent.getColor();
this.mTextColor = calendarEvent.getTextColor();
this.mAllDay = calendarEvent.isAllDay();
this.mDuration = calendarEvent.getDuration();
this.mTitle = calendarEvent.getTitle();
this.mDescription = calendarEvent.getDescription();
this.mLocation = calendarEvent.getLocation();
this.mStartTime = calendarEvent.getStartTime();
this.mEndTime = calendarEvent.getEndTime();
this.mShowBadge = calendarEvent.getShowBadge();
}
// endregion
// region Getters/Setters
public int getColor() {
return mColor;
}
public void setColor(int mColor) {
this.mColor = mColor;
}
public int getTextColor() {
return mTextColor;
}
public void setTextColor(int mTextColor) {
this.mTextColor = mTextColor;
}
public String getDescription() {
return mDescription;
}
public boolean isAllDay() {
return mAllDay;
}
public void setAllDay(boolean allDay) {
this.mAllDay = allDay;
}
public void setDescription(String mDescription) {
this.mDescription = mDescription;
}
public Calendar getInstanceDay() {
return mInstanceDay;
}
public void setInstanceDay(Calendar mInstanceDay) {
this.mInstanceDay = mInstanceDay;
this.mInstanceDay.set(Calendar.HOUR, 0);
this.mInstanceDay.set(Calendar.MINUTE, 0);
this.mInstanceDay.set(Calendar.SECOND, 0);
this.mInstanceDay.set(Calendar.MILLISECOND, 0);
this.mInstanceDay.set(Calendar.AM_PM, 0);
}
public Calendar getEndTime() {
return mEndTime;
}
public void setEndTime(Calendar mEndTime) {
this.mEndTime = mEndTime;
}
public void setPlaceholder(boolean placeholder) {
mPlaceHolder = placeholder;
}
public boolean isPlaceholder() {
return mPlaceHolder;
}
public long getId() {
return mId;
}
public void setId(long mId) {
this.mId = mId;
}
public boolean getShowBadge() {
return mShowBadge;
}
public void setShowBadge(boolean mShowBadge) {
this.mShowBadge = mShowBadge;
}
public String getLocation() {
return mLocation;
}
public void setLocation(String mLocation) {
this.mLocation = mLocation;
}
public Calendar getStartTime() {
return mStartTime;
}
public void setStartTime(Calendar mStartTime) {
this.mStartTime = mStartTime;
}
public String getTitle() {
return mTitle;
}
public void setTitle(String mTitle) {
this.mTitle = mTitle;
}
public String getDuration() {
return mDuration;
}
public void setDuration(String duration) {
this.mDuration = duration;
}
public boolean isPlaceHolder() {
return mPlaceHolder;
}
public void setPlaceHolder(boolean mPlaceHolder) {
this.mPlaceHolder = mPlaceHolder;
}
public boolean isWeather() {
return mWeather;
}
public void setWeather(boolean mWeather) {
this.mWeather = mWeather;
}
public IDayItem getDayReference() {
return mDayReference;
}
public void setDayReference(IDayItem mDayReference) {
this.mDayReference = mDayReference;
}
public IWeekItem getWeekReference() {
return mWeekReference;
}
public void setWeekReference(IWeekItem mWeekReference) {
this.mWeekReference = mWeekReference;
}
public String getWeatherIcon() {
return mWeatherIcon;
}
public void setWeatherIcon(String mWeatherIcon) {
this.mWeatherIcon = mWeatherIcon;
}
public double getTemperature() {
return mTemperature;
}
public void setTemperature(double mTemperature) {
this.mTemperature = mTemperature;
}
@Override
public CalendarEvent copy() {
return new BaseCalendarEvent(this);
}
// endregion
@Override
public String toString() {
return "BaseCalendarEvent{"
+ "title='"
+ mTitle
+ ", instanceDay= "
+ mInstanceDay.getTime()
+ "}";
}
}

View File

@ -1,63 +0,0 @@
package com.github.tibolte.agendacalendarview.models;
import java.util.Calendar;
public interface CalendarEvent {
void setPlaceholder(boolean placeholder);
boolean isPlaceholder();
public String getLocation();
public void setLocation(String mLocation);
long getId();
void setId(long mId);
boolean getShowBadge();
void setShowBadge(boolean mShowBadge);
int getTextColor();
void setTextColor(int mTextColor);
String getDescription();
void setDescription(String mDescription);
boolean isAllDay();
void setAllDay(boolean allDay);
Calendar getStartTime();
void setStartTime(Calendar mStartTime);
Calendar getEndTime();
void setEndTime(Calendar mEndTime);
String getTitle();
void setTitle(String mTitle);
Calendar getInstanceDay();
void setInstanceDay(Calendar mInstanceDay);
IDayItem getDayReference();
void setDayReference(IDayItem mDayReference);
IWeekItem getWeekReference();
void setWeekReference(IWeekItem mWeekReference);
CalendarEvent copy();
int getColor();
}

View File

@ -1,145 +0,0 @@
package com.github.tibolte.agendacalendarview.models;
import com.github.tibolte.agendacalendarview.CalendarManager;
import com.github.tibolte.agendacalendarview.utils.DateHelper;
import java.util.Calendar;
import java.util.Date;
/**
* Day model class.
*/
public class DayItem implements IDayItem {
private Date mDate;
private int mValue;
private int mDayOfTheWeek;
private boolean mToday;
private boolean mFirstDayOfTheMonth;
private boolean mSelected;
private String mMonth;
private boolean mShowBadge;
// region Constructor
public DayItem(Date date, int value, boolean today, String month) {
this.mDate = date;
this.mValue = value;
this.mToday = today;
this.mMonth = month;
}
// only for cleanDay
public DayItem() {
}
public DayItem(DayItem original) {
this.mDate = original.getDate();
this.mValue = original.getValue();
this.mToday = original.isToday();
this.mDayOfTheWeek = original.getDayOftheWeek();
this.mFirstDayOfTheMonth = original.isFirstDayOfTheMonth();
this.mSelected = original.isSelected();
this.mMonth = original.getMonth();
this.mShowBadge = original.mShowBadge;
}
// endregion
// region Getters/Setters
public Date getDate() {
return mDate;
}
public void setDate(Date date) {
this.mDate = date;
}
public int getValue() {
return mValue;
}
public void setValue(int value) {
this.mValue = value;
}
public boolean isToday() {
return mToday;
}
public void setToday(boolean today) {
this.mToday = today;
}
public boolean isSelected() {
return mSelected;
}
public void setSelected(boolean selected) {
this.mSelected = selected;
}
public boolean isFirstDayOfTheMonth() {
return mFirstDayOfTheMonth;
}
public void setFirstDayOfTheMonth(boolean firstDayOfTheMonth) {
this.mFirstDayOfTheMonth = firstDayOfTheMonth;
}
public String getMonth() {
return mMonth;
}
public void setMonth(String month) {
this.mMonth = month;
}
public int getDayOftheWeek() {
return mDayOfTheWeek;
}
public void setDayOftheWeek(int mDayOftheWeek) {
this.mDayOfTheWeek = mDayOftheWeek;
}
public void setShowBadge(boolean showBadge) {
this.mShowBadge = showBadge;
}
public boolean getShowBadge() {
return this.mShowBadge;
}
// region Public methods
public void buildDayItemFromCal(Calendar calendar) {
Date date = calendar.getTime();
this.mDate = date;
this.mValue = calendar.get(Calendar.DAY_OF_MONTH);
this.mToday = DateHelper.sameDate(calendar, CalendarManager.getInstance().getToday());
this.mMonth = CalendarManager.getInstance().getMonthHalfNameFormat().format(date);
if (this.mValue == 1) {
this.mFirstDayOfTheMonth = true;
}
}
// endregion
@Override
public String toString() {
return "DayItem{"
+ "Date='"
+ mDate.toString()
+ ", value="
+ mValue
+ '}';
}
@Override
public IDayItem copy() {
return new DayItem(this);
}
// endregion
}

View File

@ -1,49 +0,0 @@
package com.github.tibolte.agendacalendarview.models;
import java.util.Calendar;
import java.util.Date;
public interface IDayItem {
// region Getters/Setters
Date getDate();
void setDate(Date date);
int getValue();
void setValue(int value);
boolean isToday();
void setToday(boolean today);
boolean isSelected();
void setSelected(boolean selected);
boolean isFirstDayOfTheMonth();
void setFirstDayOfTheMonth(boolean firstDayOfTheMonth);
String getMonth();
void setMonth(String month);
int getDayOftheWeek();
void setDayOftheWeek(int mDayOftheWeek);
// endregion
void buildDayItemFromCal(Calendar calendar);
String toString();
IDayItem copy();
void setShowBadge(boolean showBadge);
boolean getShowBadge();
}

View File

@ -1,34 +0,0 @@
package com.github.tibolte.agendacalendarview.models;
import java.util.Date;
import java.util.List;
public interface IWeekItem {
int getWeekInYear();
void setWeekInYear(int weekInYear);
int getYear();
void setYear(int year);
int getMonth();
void setMonth(int month);
Date getDate();
void setDate(Date date);
String getLabel();
void setLabel(String label);
List<IDayItem> getDayItems();
void setDayItems(List<IDayItem> dayItems);
IWeekItem copy();
}

View File

@ -1,110 +0,0 @@
package com.github.tibolte.agendacalendarview.models;
import java.util.Date;
import java.util.List;
/**
* Week model class.
*/
public class WeekItem implements IWeekItem {
private int mWeekInYear;
private int mYear;
private int mMonth;
private Date mDate;
private String mLabel;
private List<IDayItem> mDayItems;
// region Constructor
public WeekItem(int weekInYear, int year, Date date, String label, int month) {
this.mWeekInYear = weekInYear;
this.mYear = year;
this.mDate = date;
this.mLabel = label;
this.mMonth = month;
}
public WeekItem(WeekItem original) {
this.mWeekInYear = original.getWeekInYear();
this.mYear = original.getYear();
this.mMonth = original.getMonth();
this.mDate = original.getDate();
this.mLabel = original.getLabel();
this.mDayItems = original.getDayItems();
}
public WeekItem(){
}
// endregion
// region Getters/Setters
public int getWeekInYear() {
return mWeekInYear;
}
public void setWeekInYear(int weekInYear) {
this.mWeekInYear = weekInYear;
}
public int getYear() {
return mYear;
}
public void setYear(int year) {
this.mYear = year;
}
public int getMonth() {
return mMonth;
}
public void setMonth(int month) {
this.mMonth = month;
}
public Date getDate() {
return mDate;
}
public void setDate(Date date) {
this.mDate = date;
}
public String getLabel() {
return mLabel;
}
public void setLabel(String label) {
this.mLabel = label;
}
public List<IDayItem> getDayItems() {
return mDayItems;
}
public void setDayItems(List<IDayItem> dayItems) {
this.mDayItems = dayItems;
}
@Override
public IWeekItem copy() {
return new WeekItem(this);
}
// endregion
@Override
public String toString() {
return "WeekItem{"
+ "label='"
+ mLabel
+ '\''
+ ", weekInYear="
+ mWeekInYear
+ ", year="
+ mYear
+ '}';
}
}

View File

@ -1,82 +0,0 @@
package com.github.tibolte.agendacalendarview.render;
import android.content.Context;
import android.content.res.Resources;
import androidx.annotation.NonNull;
import androidx.cardview.widget.CardView;
import androidx.core.content.ContextCompat;
import android.graphics.Color;
import android.util.TypedValue;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.github.tibolte.agendacalendarview.R;
import com.github.tibolte.agendacalendarview.models.BaseCalendarEvent;
import com.google.android.material.internal.ViewUtils;
/**
* Class helping to inflate our default layout in the AgendaAdapter
*/
public class DefaultEventRenderer extends EventRenderer<BaseCalendarEvent> {
public static int themeAttributeToColor(int themeAttributeId,
Context context,
int fallbackColorId) {
TypedValue outValue = new TypedValue();
Resources.Theme theme = context.getTheme();
boolean wasResolved =
theme.resolveAttribute(
themeAttributeId, outValue, true);
if (wasResolved) {
return ContextCompat.getColor(
context, outValue.resourceId);
} else {
// fallback colour handling
return fallbackColorId;
}
}
// region class - EventRenderer
@Override
public void render(@NonNull View view, @NonNull BaseCalendarEvent event) {
CardView card = view.findViewById(R.id.view_agenda_event_card_view);
TextView txtTitle = view.findViewById(R.id.view_agenda_event_title);
TextView txtLocation = view.findViewById(R.id.view_agenda_event_location);
LinearLayout descriptionContainer = view.findViewById(R.id.view_agenda_event_description_container);
LinearLayout locationContainer = view.findViewById(R.id.view_agenda_event_location_container);
descriptionContainer.setVisibility(View.VISIBLE);
txtTitle.setText(event.getTitle());
txtLocation.setText(event.getLocation());
if (event.getLocation().length() > 0) {
locationContainer.setVisibility(View.VISIBLE);
txtLocation.setText(event.getLocation());
} else {
locationContainer.setVisibility(View.GONE);
}
if (!event.isPlaceholder()/*!event.getTitle().equals(view.getResources().getString(R.string.agenda_event_no_events))*/) {
txtTitle.setTextColor(event.getTextColor());
card.setCardBackgroundColor(event.getColor());
txtLocation.setTextColor(event.getTextColor());
}
else {
card.setCardBackgroundColor(Color.TRANSPARENT);
card.setCardElevation(0);
card.setBackgroundColor(Color.TRANSPARENT);
card.setRadius(0);
card.setBackgroundDrawable(null);
}
}
@Override
public int getEventLayout() {
return R.layout.view_agenda_event;
}
// endregion
}

View File

@ -1,23 +0,0 @@
package com.github.tibolte.agendacalendarview.render;
import androidx.annotation.LayoutRes;
import android.view.View;
import com.github.tibolte.agendacalendarview.models.CalendarEvent;
import java.lang.reflect.ParameterizedType;
/**
* Base class for helping layout rendering
*/
public abstract class EventRenderer<T extends CalendarEvent> {
public abstract void render(final View view, final T event);
@LayoutRes
public abstract int getEventLayout();
public Class<T> getRenderType() {
ParameterizedType type = (ParameterizedType) getClass().getGenericSuperclass();
return (Class<T>) type.getActualTypeArguments()[0];
}
}

View File

@ -1,36 +0,0 @@
package com.github.tibolte.agendacalendarview.utils;
import rx.Observable;
import rx.subjects.PublishSubject;
import rx.subjects.SerializedSubject;
import rx.subjects.Subject;
public class BusProvider {
public static BusProvider mInstance;
private final Subject<Object, Object> mBus = new SerializedSubject<>(PublishSubject.create());
// region Constructors
public static BusProvider getInstance() {
if (mInstance == null) {
mInstance = new BusProvider();
}
return mInstance;
}
// endregion
// region Public methods
public void send(Object object) {
mBus.onNext(object);
}
public Observable<Object> toObserverable() {
return mBus;
}
// endregion
}

View File

@ -1,135 +0,0 @@
package com.github.tibolte.agendacalendarview.utils;
import com.github.tibolte.agendacalendarview.CalendarManager;
import com.github.tibolte.agendacalendarview.R;
import com.github.tibolte.agendacalendarview.models.IWeekItem;
import android.content.Context;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
import java.util.concurrent.TimeUnit;
/**
* Class containing helper functions for dates
*/
public class DateHelper {
// region Public methods
/**
* Check if two Calendar instances have the same time (by month, year and day of month)
*
* @param cal The first Calendar instance.
* @param selectedDate The second Calendar instance.
* @return True if both instances have the same time.
*/
public static boolean sameDate(Calendar cal, Calendar selectedDate) {
return cal.get(Calendar.MONTH) == selectedDate.get(Calendar.MONTH)
&& cal.get(Calendar.YEAR) == selectedDate.get(Calendar.YEAR)
&& cal.get(Calendar.DAY_OF_MONTH) == selectedDate.get(Calendar.DAY_OF_MONTH);
}
/**
* Check if a Date instance and a Calendar instance have the same time (by month, year and day
* of month)
*
* @param cal The Calendar instance.
* @param selectedDate The Date instance.
* @return True if both have the same time.
*/
public static boolean sameDate(Calendar cal, Date selectedDate) {
Calendar selectedCal = Calendar.getInstance();
selectedCal.setTime(selectedDate);
return cal.get(Calendar.MONTH) == selectedCal.get(Calendar.MONTH)
&& cal.get(Calendar.YEAR) == selectedCal.get(Calendar.YEAR)
&& cal.get(Calendar.DAY_OF_MONTH) == selectedCal.get(Calendar.DAY_OF_MONTH);
}
/**
* Check if a Date instance is between two Calendar instances' dates (inclusively) in time.
*
* @param selectedDate The date to verify.
* @param startCal The start time.
* @param endCal The end time.
* @return True if the verified date is between the two specified dates.
*/
public static boolean isBetweenInclusive(Date selectedDate, Calendar startCal, Calendar endCal) {
Calendar selectedCal = Calendar.getInstance();
selectedCal.setTime(selectedDate);
// Check if we deal with the same day regarding startCal and endCal
return sameDate(selectedCal, startCal) || selectedCal.after(startCal) && selectedCal.before(endCal);
}
/**
* Check if Calendar instance's date is in the same week, as the WeekItem instance.
*
* @param cal The Calendar instance to verify.
* @param week The WeekItem instance to compare to.
* @return True if both instances are in the same week.
*/
public static boolean sameWeek(Calendar cal, IWeekItem week) {
return (cal.get(Calendar.WEEK_OF_YEAR) == week.getWeekInYear() && cal.get(Calendar.YEAR) == week.getYear());
}
/**
* Convert a millisecond duration to a string format
*
* @param millis A duration to convert to a string form
* @return A string of the form "Xd" or either "XhXm".
*/
public static String getDuration(Context context, long millis) {
if (millis < 0) {
throw new IllegalArgumentException("Duration must be greater than zero!");
}
long days = TimeUnit.MILLISECONDS.toDays(millis);
millis -= TimeUnit.DAYS.toMillis(days);
long hours = TimeUnit.MILLISECONDS.toHours(millis);
millis -= TimeUnit.HOURS.toMillis(hours);
long minutes = TimeUnit.MILLISECONDS.toMinutes(millis);
StringBuilder sb = new StringBuilder(64);
if (days > 0) {
sb.append(days);
sb.append(context.getResources().getString(R.string.agenda_event_day_duration));
return (sb.toString());
} else {
if (hours > 0) {
sb.append(hours);
sb.append("h");
}
if (minutes > 0) {
sb.append(minutes);
sb.append("m");
}
}
return (sb.toString());
}
/**
* Used for displaying the date in any section of the agenda view.
*
* @param calendar The date of the section.
* @param locale The locale used by the Sunrise calendar.
* @return The formatted date without the year included.
*/
public static String getYearLessLocalizedDate(Calendar calendar, Locale locale) {
SimpleDateFormat sdf = (SimpleDateFormat) SimpleDateFormat.getDateInstance(DateFormat.FULL, CalendarManager.getInstance().getLocale());
String pattern = sdf.toPattern();
String yearLessPattern = pattern.replaceAll("\\W?[Yy]+\\W?", "");
SimpleDateFormat yearLessSDF = new SimpleDateFormat(yearLessPattern, locale);
String yearLessDate = yearLessSDF.format(calendar.getTime()).toUpperCase();
if (yearLessDate.endsWith(",")) {
yearLessDate = yearLessDate.substring(0, yearLessDate.length() - 1);
}
return yearLessDate;
}
// endregion
}

View File

@ -1,43 +0,0 @@
package com.github.tibolte.agendacalendarview.utils;
import com.github.tibolte.agendacalendarview.models.IDayItem;
import java.util.Calendar;
/**
* Events emitted by the bus provider.
*/
public class Events {
public static class DayClickedEvent {
public Calendar mCalendar;
public IDayItem mDayItem;
public DayClickedEvent(IDayItem dayItem) {
this.mCalendar = Calendar.getInstance();
this.mCalendar.setTime(dayItem.getDate());
this.mDayItem = dayItem;
}
public Calendar getCalendar() {
return mCalendar;
}
public IDayItem getDay() {
return mDayItem;
}
}
public static class CalendarScrolledEvent {
}
public static class AgendaListViewTouchedEvent {
}
public static class EventsFetched {
}
public static class ForecastFetched {
}
}

View File

@ -1,114 +0,0 @@
package com.github.tibolte.agendacalendarview.utils;
import com.github.tibolte.agendacalendarview.agenda.AgendaListView;
import android.util.SparseArray;
import android.view.View;
/**
* Helper class calculating the scrolling distance in the AgendaListView.
*/
public class ListViewScrollTracker {
private AgendaListView mListView;
private SparseArray<Integer> mPositions;
private SparseArray<Integer> mListViewItemHeights = new SparseArray<>();
private int mFirstVisiblePosition;
private int mReferencePosition = -1; // Position of the current date in the Agenda listView
// region Constructor and Accessor(s)
public ListViewScrollTracker(AgendaListView listView) {
mListView = listView;
}
public int getReferencePosition() {
return mReferencePosition;
}
// endregion
// region Public methods
/**
* Call from an AbsListView.OnScrollListener to calculate the incremental offset (change in
* scroll offset
* since the last calculation).
*
* @param firstVisiblePosition First visible item position in the list.
* @param visibleItemCount Number of visible items in the list.
* @return The incremental offset, or 0 if it wasn't possible to calculate the offset.
*/
public int calculateIncrementalOffset(int firstVisiblePosition, int visibleItemCount) {
// Remember previous positions, if any
SparseArray<Integer> previousPositions = mPositions;
// Store new positions
mPositions = new SparseArray<>();
for (int i = 0; i < visibleItemCount; i++) {
mPositions.put(firstVisiblePosition + i, mListView.getListChildAt(i).getTop());
}
if (previousPositions != null) {
// Find position which exists in both mPositions and previousPositions, then return the difference
// of the new and old Y values.
for (int i = 0; i < previousPositions.size(); i++) {
int previousPosition = previousPositions.keyAt(i);
int previousTop = previousPositions.get(previousPosition);
Integer newTop = mPositions.get(previousPosition);
if (newTop != null) {
return newTop - previousTop;
}
}
}
return 0; // No view's position was in both previousPositions and mPositions
}
/**
* Call from an AbsListView.OnScrollListener to calculate the scrollY (Here
* we definite as the distance in pixels compared to the position representing the current
* date).
*
* @param firstVisiblePosition First visible item position in the list.
* @param visibleItemCount Number of visible items in the list.
* @return Distance in pixels compared to current day position (negative if firstVisiblePosition less than mReferencePosition)
*/
public int calculateScrollY(int firstVisiblePosition, int visibleItemCount) {
mFirstVisiblePosition = firstVisiblePosition;
if (mReferencePosition < 0) {
mReferencePosition = mFirstVisiblePosition;
}
if (visibleItemCount > 0) {
View c = mListView.getListChildAt(0); // this is the first visible row
int scrollY = -c.getTop();
mListViewItemHeights.put(firstVisiblePosition, c.getMeasuredHeight());
if (mFirstVisiblePosition >= mReferencePosition) {
for (int i = mReferencePosition; i < firstVisiblePosition; ++i) {
if (mListViewItemHeights.get(i) == null) {
mListViewItemHeights.put(i, c.getMeasuredHeight());
}
scrollY += mListViewItemHeights.get(i); // add all heights of the views that are gone
}
return scrollY;
} else {
for (int i = mReferencePosition - 1; i >= firstVisiblePosition; --i) {
if (mListViewItemHeights.get(i) == null) {
mListViewItemHeights.put(i, c.getMeasuredHeight());
}
scrollY -= mListViewItemHeights.get(i);
}
return scrollY;
}
}
return 0;
}
public void clear() {
mPositions = null;
}
// endregion
}

View File

@ -1,110 +0,0 @@
package com.github.tibolte.agendacalendarview.widgets;
import android.content.Context;
import android.util.AttributeSet;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.view.animation.Interpolator;
/**
* Floating action button helping to scroll back to the current date.
*/
public class FloatingActionButton extends com.google.android.material.floatingactionbutton.FloatingActionButton {
private static final int TRANSLATE_DURATION_MILLIS = 200;
private boolean mVisible = true;
private final Interpolator mInterpolator = new AccelerateDecelerateInterpolator();
// region Constructors
public FloatingActionButton(Context context) {
super(context);
}
public FloatingActionButton(Context context, AttributeSet attrs) {
super(context, attrs);
}
public FloatingActionButton(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
// endregion
// region Overrides
@Override
public void show() {
show(true);
}
@Override
public void hide() {
hide(true);
}
// endregion
// region Public methods
public void show(boolean animate) {
toggle(true, animate, false);
}
public void hide(boolean animate) {
toggle(false, animate, false);
}
public boolean isVisible() {
return mVisible;
}
// endregion
// region Private methods
private void toggle(final boolean visible, final boolean animate, boolean force) {
if (mVisible != visible || force) {
mVisible = visible;
int height = getHeight();
if (height == 0 && !force) {
ViewTreeObserver vto = getViewTreeObserver();
if (vto.isAlive()) {
vto.addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
@Override
public boolean onPreDraw() {
ViewTreeObserver currentVto = getViewTreeObserver();
if (currentVto.isAlive()) {
currentVto.removeOnPreDrawListener(this);
}
toggle(visible, animate, true);
return true;
}
});
return;
}
}
int translationY = visible ? 0 : height + getMarginBottom();
if (animate) {
animate().setInterpolator(mInterpolator)
.setDuration(TRANSLATE_DURATION_MILLIS)
.translationY(translationY);
} else {
setTranslationY(translationY);
}
}
}
private int getMarginBottom() {
int marginBottom = 0;
final ViewGroup.LayoutParams layoutParams = getLayoutParams();
if (layoutParams instanceof ViewGroup.MarginLayoutParams) {
marginBottom = ((ViewGroup.MarginLayoutParams) layoutParams).bottomMargin;
}
return marginBottom;
}
// endregion
}

View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<stroke android:width="2dp" android:color="@color/theme_primary"/>
<solid android:color="@android:color/transparent" />
</shape>

View File

@ -1,7 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="#fff" android:pathData="M7,10H12V15H7M19,19H5V8H19M19,3H18V1H16V3H8V1H6V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3Z" />
</vector>

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<stroke android:width="1dp" android:color="@color/theme_text_icons"/>
<solid android:color="@android:color/transparent" />
</shape>

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="270"
android:startColor="#88444444"
android:endColor="#00000000" />
</shape>

View File

@ -1,48 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/week_days_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<include layout="@layout/view_day_cell" />
<include layout="@layout/view_day_cell" />
<include layout="@layout/view_day_cell" />
<include layout="@layout/view_day_cell" />
<include layout="@layout/view_day_cell" />
<include layout="@layout/view_day_cell" />
<include layout="@layout/view_day_cell" />
</LinearLayout>
<FrameLayout
android:id="@+id/month_background"
android:layout_width="match_parent"
android:layout_height="@dimen/day_cell_height"
android:alpha="0"
android:background="@color/calendar_month_transparent_background" />
<TextView
android:id="@+id/month_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:alpha="0"
tools:alpha="1"
android:textColor="@android:color/black"
android:textSize="17sp"
android:textStyle="bold"
tools:text="MAJ" />
</RelativeLayout>

View File

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<View
android:id="@+id/view_shadow"
android:layout_width="match_parent"
android:layout_height="5dp"
android:background="@drawable/shadow"
android:visibility="visible"/>
<com.github.tibolte.agendacalendarview.agenda.AgendaListView
android:id="@+id/agenda_listview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:animationCache="false"
android:divider="@color/agenda_list_header_divider"
android:dividerHeight="1dp"
android:overScrollMode="never"
android:scrollbars="none"
android:scrollingCache="false" />
</merge>

View File

@ -1,53 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<com.github.tibolte.agendacalendarview.agenda.AgendaEventView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:gravity="center_vertical"
android:orientation="horizontal">
<androidx.cardview.widget.CardView
android:id="@+id/view_agenda_event_card_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:cardBackgroundColor="@color/blue_selected"
app:cardCornerRadius="5dp">
<LinearLayout
android:id="@+id/view_agenda_event_description_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="10dp">
<TextView
android:id="@+id/view_agenda_event_title"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textSize="16sp"
tools:text="sprawdzian - Biotechnologia" />
<LinearLayout
android:id="@+id/view_agenda_event_location_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/view_agenda_event_location"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/calendar_text_default"
android:textSize="12sp"
tools:text="9:05, biologia, Beata Pudełko, 1B3T" />
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
</com.github.tibolte.agendacalendarview.agenda.AgendaEventView>

View File

@ -1,64 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<com.github.tibolte.agendacalendarview.agenda.AgendaHeaderView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/view_agenda_day_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textSize="18sp"
android:visibility="visible" />
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp">
<View
android:id="@+id/view_day_circle_selected"
android:layout_width="@dimen/circle_day_size"
android:layout_height="@dimen/circle_day_size"
android:background="@drawable/agenda_day_circle"
android:visibility="invisible"
tools:visibility="visible" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:orientation="vertical">
<TextView
android:id="@+id/view_agenda_day_of_month"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textSize="20sp"
tools:text="24" />
<TextView
android:id="@+id/view_agenda_day_of_week"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:textSize="12sp"
android:visibility="visible"
tools:text="śr." />
</LinearLayout>
</FrameLayout>
</FrameLayout>
</com.github.tibolte.agendacalendarview.agenda.AgendaHeaderView>

View File

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<com.github.tibolte.agendacalendarview.calendar.CalendarView
android:id="@+id/calendar_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<com.github.tibolte.agendacalendarview.agenda.AgendaView
android:id="@+id/agenda_view"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</com.github.tibolte.agendacalendarview.agenda.AgendaView>
<com.github.tibolte.agendacalendarview.widgets.FloatingActionButton
android:id="@+id/floating_action_button"
style="@style/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="center" />
</merge>

View File

@ -1,48 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:parentTag="LinearLayout"
tools:orientation="vertical">
<!-- Day names labels -->
<LinearLayout
android:id="@+id/cal_day_names"
android:layout_width="match_parent"
android:layout_height="@dimen/calendar_header_height"
android:orientation="horizontal">
<include layout="@layout/view_day_calendar_header" />
<include layout="@layout/view_day_calendar_header" />
<include layout="@layout/view_day_calendar_header" />
<include layout="@layout/view_day_calendar_header" />
<include layout="@layout/view_day_calendar_header" />
<include layout="@layout/view_day_calendar_header" />
<include layout="@layout/view_day_calendar_header" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:layout_marginTop="2dp"
android:background="#ff7f7f7f" />
<com.github.tibolte.agendacalendarview.calendar.weekslist.WeekListView
android:id="@+id/list_week"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:cacheColorHint="@android:color/transparent"
android:divider="@color/calendar_divider_color"
android:dividerHeight="1dp"
android:drawSelectorOnTop="false"
android:listSelector="@android:color/transparent"
android:overScrollMode="never"
android:scrollbars="none" />
</merge>

View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:textColor="@android:color/white"
tools:text="pon." />

View File

@ -1,85 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="0dip"
android:layout_height="@dimen/day_cell_height"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/view_day_month_label"
style="@style/CalendarCellText"
android:visibility="gone"
tools:text="maj" />
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<View
android:id="@+id/view_day_circle_selected"
android:layout_width="@dimen/circle_selected_size"
android:layout_height="@dimen/circle_selected_size"
android:background="@drawable/selected_day_color_circle"
android:visibility="gone" />
<TextView
android:id="@+id/view_day_day_label"
style="@style/CalendarCellText"
android:layout_gravity="center"
tools:text="1" />
</FrameLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="10dp"
android:layout_gravity="bottom"
android:gravity="center"
android:orientation="horizontal">
<View
android:id="@+id/view_day_event_indicator3"
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_marginStart="3dp"
android:layout_marginLeft="3dp"
android:background="@drawable/event_color_circle"
android:visibility="invisible" />
<View
android:id="@+id/view_day_event_indicator2"
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_marginStart="3dp"
android:layout_marginLeft="3dp"
android:background="@drawable/event_color_circle"
android:visibility="invisible" />
<View
android:id="@+id/view_day_event_indicator1"
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_marginStart="3dp"
android:layout_marginLeft="3dp"
android:background="@drawable/event_color_circle"
android:visibility="invisible" />
</LinearLayout>
</FrameLayout>
</LinearLayout>

View File

@ -1,12 +0,0 @@
<resources>
<!-- Agenda -->
<string name="today">Today</string>
<string name="tomorrow">Tomorrow</string>
<string name="agenda_event_day_duration">d</string>
<string name="agenda_event_all_day">All day</string>
<string name="agenda_event_no_events">No events</string>
<!-- Weather -->
<string name="month_name_format">LLLL</string>
<string name="month_half_name_format">MMM</string>
</resources>

View File

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="ColorOptionsView">
<attr name="agendaCurrentDayTextColor" format="color" />
<attr name="calendarHeaderColor" format="color" />
<attr name="calendarHeaderTextColor" format="color" />
<attr name="calendarColor" format="color" />
<attr name="calendarDayTextColor" format="color" />
<attr name="calendarPastDayTextColor" format="color" />
<attr name="calendarCurrentDayTextColor" format="color" />
<attr name="fabColor" format="color" />
</declare-styleable>
</resources>

View File

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Colors for Calendar view -->
<color name="calendar_text_current_day">#000000</color>
<color name="calendar_text_default">#9C9CA0</color>
<color name="calendar_month_transparent_background">#CCFFFFFF</color>
<color name="calendar_divider_color">#F3F3F3</color>
<!-- Colors for Agenda view -->
<!--<color name="agenda_list_header_divider">#666666</color>-->
<color name="agenda_list_header_divider">#00000000</color>
<!-- General -->
<color name="blue_selected">#2196F3</color>
<color name="theme_primary_dark">#1976D2</color>
<color name="theme_primary">#2196F3</color>
<color name="theme_light_primary">#BBDEFB</color>
<color name="theme_accent">#4caf50</color>
<color name="theme_text_icons">#FFFFFF</color>
</resources>

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Calendar values -->
<dimen name="calendar_header_height">20dp</dimen>
<dimen name="day_cell_height">52dp</dimen>
<dimen name="text_day_size">14dp</dimen>
<dimen name="circle_selected_size">32dp</dimen>
<!-- Agenda values -->
<dimen name="circle_day_size">60dp</dimen>
<!-- Floating action button values -->
<!--<dimen name="fab_size">56dp</dimen>-->
<dimen name="agenda_event_view_padding_left">70dp</dimen>
<dimen name="agenda_event_view_padding_top">5dp</dimen>
<dimen name="agenda_event_view_padding_right">15dp</dimen>
<dimen name="agenda_event_view_padding_bottom">5dp</dimen>
</resources>

View File

@ -1,14 +0,0 @@
<resources>
<!-- Calendar -->
<string name="month_name_format">LLLL</string>
<string name="day_name_format" translatable="false">E</string>
<!-- Agenda -->
<string name="today">Dziś</string>
<string name="tomorrow">Jutro</string>
<string name="agenda_event_day_duration">d</string>
<string name="agenda_event_all_day">Cały dzień</string>
<string name="agenda_event_no_events">Brak wydarzeń</string>
<string name="month_half_name_format">MMM</string>
</resources>

View File

@ -1,25 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Calendar styles -->
<style name="CalendarCellText">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:textColor">@color/calendar_text_default</item>
<item name="android:textStyle">normal</item>
<item name="android:textSize">@dimen/text_day_size</item>
</style>
<!-- Agenda styles -->
<!-- FAB -->
<style name="fab">
<item name="android:src">@drawable/fab_arrow</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_gravity">bottom|start</item>
<item name="android:layout_margin">16dp</item>
<item name="elevation">8dp</item>
<item name="fabSize">normal</item>
<item name="pressedTranslationZ">6dp</item>
</style>
</resources>

View File

@ -1,176 +1,231 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-parcelize'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric'
apply plugin: 'com.google.firebase.crashlytics'
apply from: 'git-info.gradle'
android {
signingConfigs {
}
compileSdkVersion rootProject.ext.compileSdkVersion
compileSdkVersion setup.compileSdk
defaultConfig {
applicationId 'pl.szczodrzynski.edziennik'
minSdkVersion setup.minSdk
targetSdkVersion setup.targetSdk
versionCode release.versionCode
versionName release.versionName
multiDexEnabled true
}
buildTypes {
applicationVariants.all { variant ->
variant.outputs.all {
if (variant.buildType.name == "release") {
outputFileName = "Edziennik_" + defaultConfig.versionName + ".apk"
} else if (variant.buildType.name == "debugMinify") {
outputFileName = "Edziennik_" + defaultConfig.versionName + "_debugMinify.apk"
} else {
outputFileName = "Edziennik_" + defaultConfig.versionName + "_debug.apk"
}
buildConfigField "java.util.Map<String, String>", "GIT_INFO", gitInfoMap
buildConfigField "String", "VERSION_BASE", "\"${release.versionName}\""
manifestPlaceholders = [
buildTimestamp: String.valueOf(System.currentTimeMillis())
]
multiDexEnabled = true
externalNativeBuild {
cmake {
cppFlags "-std=c++11"
}
}
kapt {
arguments {
arg("room.schemaLocation", "$projectDir/schemas")
}
}
}
buildTypes {
debug {
minifyEnabled false
getIsDefault().set(true)
minifyEnabled = false
manifestPlaceholders = [
buildTimestamp: 0
]
}
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt')
minifyEnabled = true
shrinkResources = true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
proguardFiles fileTree('proguard').asList().toArray()
}
}
dependencies {
implementation "com.google.firebase:firebase-core:${versions.firebase}"
flavorDimensions "platform"
productFlavors {
unofficial {
getIsDefault().set(true)
versionName "${release.versionName}-${gitInfo.versionSuffix}"
}
official {}
play {}
}
variantFilter { variant ->
def flavors = variant.flavors*.name
setIgnore(variant.buildType.name == "debug" && !flavors.contains("unofficial") || flavors.contains("main"))
}
sourceSets {
unofficial {
java.srcDirs = ["src/main/java", "src/play-not/java"]
manifest.srcFile("src/play-not/AndroidManifest.xml")
}
official {
java.srcDirs = ["src/main/java", "src/play-not/java"]
manifest.srcFile("src/play-not/AndroidManifest.xml")
}
play {
java.srcDirs = ["src/main/java", "src/play/java"]
}
}
defaultConfig {
vectorDrawables.useSupportLibrary = true
}
lintOptions {
checkReleaseBuilds false
}
dataBinding {
enabled = true
buildFeatures {
dataBinding = true
viewBinding = true
}
compileOptions {
sourceCompatibility '1.8'
targetCompatibility '1.8'
}
productFlavors {
coreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
packagingOptions {
exclude 'META-INF/library-core_release.kotlin_module'
resources {
excludes += ['META-INF/library-core_release.kotlin_module']
}
}
externalNativeBuild {
cmake {
path "src/main/cpp/CMakeLists.txt"
version "3.10.2"
}
}
lint {
checkReleaseBuilds false
}
}
/*task finalizeBundleDebug(type: Copy) {
from("debug/debug")
include "app.aab"
destinationDir file("debug/debug")
rename "app.aab", "Edziennik_debug.aab"
}
// it finalizes :bundleRelease
task finalizeBundleRelease(type: Copy) {
from("release/release")
include "app.aab"
destinationDir file("release/release")
rename "app.aab", "Edziennik_${android.defaultConfig.versionCode}.aab"
}*/
/*
// this adds the above two tasks
tasks.whenTaskAdded { task ->
if (task.name == "bundleDebug") {
task.finalizedBy finalizeBundleDebug
} else if (task.name == "bundleRelease") {
task.finalizedBy finalizeBundleRelease
if (!task.name.endsWith("Release") && !task.name.endsWith("ReleaseWithR8"))
return
def renameTaskName = "rename${task.name.capitalize()}"
def flavor = ""
if (task.name.startsWith("bundle"))
flavor = task.name.substring("bundle".length(), task.name.indexOf("Release")).uncapitalize()
if (task.name.startsWith("assemble"))
flavor = task.name.substring("assemble".length(), task.name.indexOf("Release")).uncapitalize()
if (task.name.startsWith("minify"))
flavor = task.name.substring("minify".length(), task.name.indexOf("Release")).uncapitalize()
if (flavor != "") {
tasks.create(renameTaskName, Copy) {
from file("${projectDir}/${flavor}/release/"),
file("${buildDir}/outputs/mapping/${flavor}Release/"),
file("${buildDir}/outputs/apk/${flavor}/release/"),
file("${buildDir}/outputs/bundle/${flavor}Release/")
include "*.aab", "*.apk", "mapping.txt", "output-metadata.json"
destinationDir file("${projectDir}/release/")
rename ".+?\\.(.+)", "Edziennik_${android.defaultConfig.versionName}_${flavor}." + '$1'
}
task.finalizedBy(renameTaskName)
}
}*/
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
annotationProcessor "androidx.room:room-compiler:${versions.room}"
debugImplementation "com.amitshekhar.android:debug-db:1.0.5"
// Language cores
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "androidx.multidex:multidex:2.0.1"
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:1.1.5"
implementation "android.arch.navigation:navigation-fragment-ktx:${versions.navigationFragment}"
implementation "androidx.appcompat:appcompat:${versions.appcompat}"
implementation "androidx.cardview:cardview:${versions.cardView}"
implementation "androidx.constraintlayout:constraintlayout:${versions.constraintLayout}"
implementation "androidx.core:core-ktx:${versions.ktx}"
implementation "androidx.gridlayout:gridlayout:${versions.gridLayout}"
implementation "androidx.legacy:legacy-support-v4:${versions.legacy}"
implementation "androidx.lifecycle:lifecycle-livedata:${versions.lifecycle}"
implementation "androidx.recyclerview:recyclerview:${versions.recyclerView}"
implementation "androidx.room:room-runtime:${versions.room}"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${versions.kotlin}"
// Android Jetpack
implementation "androidx.appcompat:appcompat:1.5.1"
implementation "androidx.cardview:cardview:1.0.0"
implementation "androidx.constraintlayout:constraintlayout:2.1.4"
implementation "androidx.core:core-ktx:1.9.0"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.5.1"
implementation "androidx.navigation:navigation-fragment-ktx:2.5.2"
implementation "androidx.recyclerview:recyclerview:1.2.1"
implementation "androidx.room:room-runtime:2.4.3"
implementation "androidx.room:room-ktx:2.4.3"
implementation "androidx.work:work-runtime-ktx:2.7.1"
kapt "androidx.room:room-compiler:2.4.3"
implementation "com.google.android.gms:play-services-wearable:${versions.play_services}"
implementation "com.google.android.material:material:${versions.material}"
implementation "com.google.firebase:firebase-messaging:${versions.firebasemessaging}"
// Google design libs
implementation "com.google.android.material:material:1.6.1"
implementation "com.google.android.flexbox:flexbox:3.0.0"
//implementation "com.github.kuba2k2.MaterialDrawer:library:e603091449"
implementation "com.mikepenz:crossfader:1.6.0" // do not update
implementation "com.mikepenz:iconics-core:${versions.iconics}"
implementation "com.mikepenz:iconics-views:${versions.iconics}"
implementation "com.mikepenz:community-material-typeface:${versions.font_cmd}@aar"
// Play Services/Firebase
implementation "com.google.android.gms:play-services-wearable:17.1.0"
implementation("com.google.firebase:firebase-core") { version { strictly "19.0.2" } }
implementation "com.google.firebase:firebase-crashlytics:18.2.13"
implementation("com.google.firebase:firebase-messaging") { version { strictly "20.1.3" } }
implementation "com.github.kuba2k2:NavLib:${versions.navlib}"
// OkHttp, Retrofit, Gson, Jsoup
implementation("com.squareup.okhttp3:okhttp") { version { strictly "3.12.13" } }
implementation "com.squareup.retrofit2:retrofit:2.9.0"
implementation "com.squareup.retrofit2:converter-gson:2.9.0"
implementation "com.squareup.retrofit2:converter-scalars:2.9.0"
implementation 'com.google.code.gson:gson:2.8.8'
implementation 'org.jsoup:jsoup:1.14.3'
implementation "pl.droidsonroids:jspoon:1.3.2"
implementation "pl.droidsonroids.retrofit2:converter-jspoon:1.3.2"
implementation "com.afollestad.material-dialogs:commons:${versions.materialdialogs}"
implementation "com.afollestad.material-dialogs:core:${versions.materialdialogs}"
// Szkolny.eu libraries/forks
implementation "eu.szkolny:android-snowfall:1ca9ea2da3"
implementation "eu.szkolny:agendacalendarview:1.0.4"
implementation "eu.szkolny:cafebar:5bf0c618de"
implementation "eu.szkolny.fslogin:lib:2.0.0"
implementation "eu.szkolny:material-about-library:1d5ebaf47c"
implementation "eu.szkolny:mhttp:af4b62e6e9"
implementation "eu.szkolny:nachos:0e5dfcaceb"
implementation "eu.szkolny.selective-dao:annotation:27f8f3f194"
officialImplementation "eu.szkolny:ssl-provider:1.0.0"
unofficialImplementation "eu.szkolny:ssl-provider:1.0.0"
implementation "pl.szczodrzynski:navlib:0.8.0"
implementation "pl.szczodrzynski:numberslidingpicker:2921225f76"
implementation "pl.szczodrzynski:recyclertablayout:700f980584"
implementation "pl.szczodrzynski:tachyon:551943a6b5"
kapt "eu.szkolny.selective-dao:codegen:27f8f3f194"
implementation "cat.ereza:customactivityoncrash:2.2.0"
implementation "com.applandeo:material-calendar-view:1.5.0"
implementation "com.crashlytics.sdk.android:crashlytics:2.10.1"
// Iconics & related
implementation "com.mikepenz:iconics-core:5.3.2"
implementation "com.mikepenz:iconics-views:5.3.2"
implementation "com.mikepenz:community-material-typeface:5.8.55.0-kotlin@aar"
implementation "eu.szkolny:szkolny-font:77e33acc2a"
// Other dependencies
implementation "cat.ereza:customactivityoncrash:2.3.0"
implementation "com.android.volley:volley:1.2.1"
implementation "com.daimajia.swipelayout:library:1.2.0@aar"
implementation "com.evernote:android-job:1.2.6"
implementation "com.github.antonKozyriatskyi:CircularProgressIndicator:1.2.2"
implementation "com.github.bassaer:chatmessageview:2.0.1"
implementation("com.github.ozodrukh:CircularReveal:2.0.1@aar") {transitive = true}
implementation "com.heinrichreimersoftware:material-intro:1.5.8" // do not update
implementation "com.jaredrummler:colorpicker:1.0.2"
implementation "com.squareup.okhttp3:okhttp:3.12.0"
implementation "com.theartofdev.edmodo:android-image-cropper:2.8.0" // do not update
implementation "com.wdullaer:materialdatetimepicker:4.1.2"
implementation "com.yuyh.json:jsonviewer:1.0.6"
implementation "com.github.Applandeo:Material-Calendar-View:15de569cbc" // https://github.com/Applandeo/Material-Calendar-View
implementation "com.github.CanHub:Android-Image-Cropper:2.2.2" // https://github.com/CanHub/Android-Image-Cropper
implementation "com.github.ChuckerTeam.Chucker:library:3.5.2" // https://github.com/ChuckerTeam/chucker
implementation "com.github.antonKozyriatskyi:CircularProgressIndicator:1.2.2" // https://github.com/antonKozyriatskyi/CircularProgressIndicator
implementation "com.github.bassaer:chatmessageview:2.0.1" // https://github.com/bassaer/ChatMessageView
implementation "com.github.hypertrack:hyperlog-android:0.0.10" // https://github.com/hypertrack/hyperlog-android
implementation "com.github.smuyyh:JsonViewer:V1.0.6" // https://github.com/smuyyh/JsonViewer
implementation "com.github.underwindfall.PowerPermission:powerpermission-coroutines:1.4.0" // https://github.com/underwindfall/PowerPermission
implementation "com.github.underwindfall.PowerPermission:powerpermission:1.4.0" // https://github.com/underwindfall/PowerPermission
implementation "com.github.wulkanowy.uonet-request-signer:hebe-jvm:a99ca50a31" // https://github.com/wulkanowy/uonet-request-signer
implementation "com.jaredrummler:colorpicker:1.1.0"
implementation "io.coil-kt:coil:1.1.1"
implementation "me.dm7.barcodescanner:zxing:1.9.8"
implementation "me.grantland:autofittextview:0.2.1"
implementation "me.leolin:ShortcutBadger:1.1.22@aar"
implementation "org.greenrobot:eventbus:3.1.1"
implementation "org.jsoup:jsoup:1.10.1"
implementation "pl.droidsonroids.gif:android-gif-drawable:1.2.15"
//implementation "se.emilsjolander:stickylistheaders:2.7.0"
implementation 'com.github.edisonw:StickyListHeaders:master-SNAPSHOT@aar'
implementation "uk.co.samuelwall:material-tap-target-prompt:2.14.0"
implementation "org.greenrobot:eventbus:3.2.0"
implementation("com.heinrichreimersoftware:material-intro") { version { strictly "1.5.8" } }
implementation("pl.droidsonroids.gif:android-gif-drawable") { version { strictly "1.2.15" } }
implementation project(":agendacalendarview")
implementation project(":cafebar")
implementation project(":material-about-library")
implementation project(":mhttp")
implementation project(":nachos")
//implementation project(":Navigation")
implementation project(":szkolny-font")
debugImplementation "com.github.ChuckerTeam.Chucker:library:3.0.1"
releaseImplementation "com.github.ChuckerTeam.Chucker:library-no-op:3.0.1"
//implementation 'com.github.wulkanowy:uonet-request-signer:master-SNAPSHOT'
//implementation 'com.github.kuba2k2.uonet-request-signer:android:master-63f094b14a-1'
//implementation "org.redundent:kotlin-xml-builder:1.5.3"
implementation "io.github.wulkanowy:signer-android:0.1.1"
implementation "androidx.work:work-runtime-ktx:${versions.work}"
implementation 'com.hypertrack:hyperlog:0.0.10'
implementation 'com.github.kuba2k2:RecyclerTabLayout:700f980584'
implementation 'com.linkedin.android.tachyon:tachyon:1.0.2'
}
repositories {
mavenCentral()
// Debug-only dependencies
debugImplementation "com.github.amitshekhariitbhu.Android-Debug-Database:debug-db:v1.0.6"
}

124
app/git-info.gradle Normal file
View File

@ -0,0 +1,124 @@
/*
* Copyright (c) Kuba Szczodrzyński 2021-3-27.
*/
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath "org.eclipse.jgit:org.eclipse.jgit:5.5.+"
}
}
import org.eclipse.jgit.api.Git
import org.eclipse.jgit.errors.RepositoryNotFoundException
import org.eclipse.jgit.lib.Constants
import org.eclipse.jgit.lib.Ref
import org.eclipse.jgit.lib.Repository
import org.eclipse.jgit.revwalk.RevCommit
import org.eclipse.jgit.revwalk.RevTag
import org.eclipse.jgit.revwalk.RevWalk
import org.eclipse.jgit.storage.file.FileRepositoryBuilder
private def getGit() {
Repository repo
try {
repo = new FileRepositoryBuilder()
.readEnvironment()
.findGitDir(project.projectDir)
.build()
} catch (IllegalArgumentException | RepositoryNotFoundException ignore) {
def logger = LoggerFactory.getLogger("androidGitVersion")
logger.error("No git repository reachable from ${project.projectDir}")
return results
}
return Git.wrap(repo)
}
private static def getTags(Repository repo, Git git) {
RevWalk walk = new RevWalk(repo)
def tags = git.tagList().call().findResults { ref ->
def obj = walk.parseAny(ref.getObjectId())
def name = null
if (obj instanceof RevTag) {
name = obj.getTagName()
} else if (obj instanceof RevCommit) {
name = Repository.shortenRefName(ref.name)
}
[obj.id, name]
}
walk.close()
return tags
}
private static def getLastTag(Repository repo, Git git, Ref head) {
def tags = getTags(repo, git)
RevWalk revs = new RevWalk(repo)
revs.markStart(revs.parseCommit(head.getObjectId()))
def revCount = 0
Collection<List> commitTags = null
for (RevCommit commit : revs) {
def tagsHere = tags.findAll { (it[0] == commit.id) }
if (tagsHere) {
commitTags = tagsHere.stream().map {
[it[0].name, it[1], revCount]
}.toArray()
break
}
revCount++
}
return commitTags.last()
}
private def buildGitInfo() {
Git git = getGit()
Repository repo = git.repository
def head = repo.findRef(Constants.HEAD).target
def remotes = git.remoteList().call()
.stream()
.map {
it.name + "(" + it.URIs.stream()
.map { it.rawPath.stripMargin('/').replace(".git", "") }
.toArray()
.join(", ") + ")"
}
.toArray()
.join("; ")
def status = git.status().call()
def dirty = status.hasUncommittedChanges()
def tag = getLastTag(repo, git, head)
def tagName = tag[1]
def tagRevCount = tag[2]
def result = [
hash : head.objectId.name,
branch : repo.branch,
dirty : dirty,
remotes : remotes,
unstaged : status.uncommittedChanges.join("; "),
tag : tagName,
revCount : tagRevCount,
version : """$tagName-$tagRevCount-g${head.objectId.name.substring(0, 8)}""" + (dirty ? ".dirty" : ""),
versionSuffix : """${repo.branch.replace("/", "_")}""" + (dirty ? ".dirty" : "")
]
return result
}
private static def getMapString(map) {
def hashMap = "new java.util.HashMap<String, String>() { {\n"
map.each { k, v -> hashMap += """\tput("${k}", "${v}");\n""" }
return hashMap + "} }"
}
ext {
gitInfo = buildGitInfo()
gitInfoMap = getMapString(gitInfo)
}

BIN
app/libs/java-json.jar Normal file

Binary file not shown.

78
app/proguard-rules.pro vendored Normal file
View File

@ -0,0 +1,78 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-keep class android.support.v7.widget.** { *; }
-keep class pl.szczodrzynski.edziennik.utils.models.** { *; }
-keep class pl.szczodrzynski.edziennik.data.db.enums.* { *; }
-keep class pl.szczodrzynski.edziennik.data.db.entity.Event { *; }
-keep class pl.szczodrzynski.edziennik.data.db.full.EventFull { *; }
-keep class pl.szczodrzynski.edziennik.data.db.entity.FeedbackMessage { *; }
-keep class pl.szczodrzynski.edziennik.data.db.entity.Note { *; }
-keep class pl.szczodrzynski.edziennik.ui.home.HomeCardModel { *; }
-keepclassmembers class pl.szczodrzynski.edziennik.ui.widgets.WidgetConfig { public *; }
-keepnames class pl.szczodrzynski.edziennik.ui.widgets.timetable.WidgetTimetableProvider
-keepnames class pl.szczodrzynski.edziennik.ui.widgets.notifications.WidgetNotificationsProvider
-keepnames class pl.szczodrzynski.edziennik.ui.widgets.luckynumber.WidgetLuckyNumberProvider
-keep class pl.szczodrzynski.edziennik.config.AppData { *; }
-keep class pl.szczodrzynski.edziennik.config.AppData$** { *; }
-keep class pl.szczodrzynski.edziennik.utils.managers.TextStylingManager$HtmlMode { *; }
-keepnames class androidx.appcompat.view.menu.MenuBuilder { setHeaderTitleInt(java.lang.CharSequence); }
-keepnames class androidx.appcompat.view.menu.MenuPopupHelper { showPopup(int, int, boolean, boolean); }
-keepclassmembernames class androidx.appcompat.view.menu.StandardMenuPopup { private *; }
-keepclassmembernames class androidx.appcompat.view.menu.MenuItemImpl { private *; }
-keepclassmembernames class com.mikepenz.materialdrawer.widget.MiniDrawerSliderView { private *; }
-keep class .R
-keep class **.R$* {
<fields>;
}
-keepattributes SourceFile,LineNumberTable
#-printmapping mapping.txt
-keep class okhttp3.** { *; }
-keep class com.google.android.material.tabs.** {*;}
# ServiceLoader support
-keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
-keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}
# Most of volatile fields are updated with AFU and should not be mangled
-keepclassmembernames class kotlinx.** {
volatile <fields>;
}
-keepclasseswithmembernames class * {
native <methods>;
}
-keep class pl.szczodrzynski.edziennik.data.api.szkolny.interceptor.Signing { public final byte[] pleaseStopRightNow(java.lang.String, long); }
-keepclassmembers class pl.szczodrzynski.edziennik.data.api.szkolny.request.** { *; }
-keepclassmembers class pl.szczodrzynski.edziennik.data.api.szkolny.response.** { *; }
-keepclassmembernames class pl.szczodrzynski.edziennik.ui.login.LoginInfo$Platform { *; }
-keepclassmembernames class pl.szczodrzynski.fslogin.realm.RealmData { *; }
-keepclassmembernames class pl.szczodrzynski.fslogin.realm.RealmData$Type { *; }

View File

@ -1,14 +0,0 @@
-dontwarn com.evernote.android.job.gcm.**
-dontwarn com.evernote.android.job.GcmAvailableHelper
-dontwarn com.evernote.android.job.work.**
-dontwarn com.evernote.android.job.WorkManagerAvailableHelper
-keep public class com.evernote.android.job.v21.PlatformJobService
-keep public class com.evernote.android.job.v14.PlatformAlarmService
-keep public class com.evernote.android.job.v14.PlatformAlarmReceiver
-keep public class com.evernote.android.job.JobBootReceiver
-keep public class com.evernote.android.job.JobRescheduleService
-keep public class com.evernote.android.job.gcm.PlatformGcmService
-keep public class com.evernote.android.job.work.PlatformWorker
-keep class com.evernote.android.job.** { *; }

View File

@ -1,42 +0,0 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-keep class android.support.v7.widget.** { *; }
-keep class pl.szczodrzynski.edziennik.utils.models.** { *; }
-keep class pl.szczodrzynski.edziennik.data.db.modules.events.Event { *; }
-keep class pl.szczodrzynski.edziennik.data.db.modules.events.EventFull { *; }
-keepclassmembers class pl.szczodrzynski.edziennik.widgets.WidgetConfig { public *; }
-keepnames class pl.szczodrzynski.edziennik.WidgetTimetable
-keepnames class pl.szczodrzynski.edziennik.notifications.WidgetNotifications
-keepnames class pl.szczodrzynski.edziennik.luckynumber.WidgetLuckyNumber
-keep class .R
-keep class **.R$* {
<fields>;
}
-keepattributes SourceFile,LineNumberTable
#-printmapping mapping.txt
-keep class okhttp3.** { *; }
-keep class com.google.android.material.tabs.** {*;}

View File

@ -1 +0,0 @@
-keep class android.support.v8.renderscript.** { *; }

View File

@ -1,25 +0,0 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in D:\AndroidSDK/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
-keep class !android.support.v7.internal.view.menu.**,android.support.** {*;}
-keep class android.support.v7.graphics.** { *; }
-dontwarn android.support.v7.graphics.**
-keep class android.support.design.widget.** { *; }
-keep interface android.support.design.widget.** { *; }
-dontwarn android.support.design.**

View File

@ -1,14 +0,0 @@
# Android iconics library - https://github.com/mikepenz/Android-Iconics
# Warning: works ONLY with iconics > 1.0.0
#
# Tested on gradle config:
#
# compile 'com.mikepenz:iconics-core:1.7.1@aar'
#
-keep class com.mikepenz.iconics.** { *; }
-keep class com.mikepenz.community_material_typeface_library.CommunityMaterial
-keep class com.mikepenz.fontawesome_typeface_library.FontAwesome
-keep class com.mikepenz.google_material_typeface_library.GoogleMaterial
-keep class com.mikepenz.meteocons_typeface_library.Meteoconcs
-keep class com.mikepenz.octicons_typeface_library.Octicons

View File

@ -1,48 +0,0 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/wangchao/Work/android-sdk/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
-dontwarn im.wangchao.**
-dontwarn okio.**
-dontwarn javax.annotation.Nullable
-dontwarn javax.annotation.ParametersAreNonnullByDefault
-keep class im.wangchao.** { *; }
-keep class **_HttpBinder { *; }
-keepclasseswithmembernames class * {
@im.wangchao.* <fields>;
}
-keepclasseswithmembernames class * {
@im.wangchao.* <methods>;
}
-keepclassmembers class * implements java.io.Serializable {
static final long serialVersionUID;
private static final java.io.ObjectStreamField[] serialPersistentFields;
!static !transient <fields>;
private void writeObject(java.io.ObjectOutputStream);
private void readObject(java.io.ObjectInputStream);
java.lang.Object writeReplace();
java.lang.Object readResolve();
}
# okhttp
-dontwarn okhttp3.**
-dontwarn okio.**
-dontwarn javax.annotation.**
-dontwarn org.conscrypt.**
# A resource is loaded with a relative path so the package of this class must be preserved.
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
# If you do not use Rx:
-dontwarn rx.**

View File

@ -1 +0,0 @@
-keep class com.mikepenz.szkolny_font_typeface_library.SzkolnyFont { *; }

View File

@ -1,21 +0,0 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

5
app/proguard/zxing.pro Normal file
View File

@ -0,0 +1,5 @@
# For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}

View File

@ -0,0 +1,13 @@
<!--
~ Copyright (c) Kuba Szczodrzyński 2019-12-28.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FF000000"
android:pathData="M13.5,15.5H10V12.5H13.5A1.5,1.5 0,0 1,15 14A1.5,1.5 0,0 1,13.5 15.5M10,6.5H13A1.5,1.5 0,0 1,14.5 8A1.5,1.5 0,0 1,13 9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z"/>
</vector>

View File

@ -1,3 +1,7 @@
<!--
~ Copyright (c) Kuba Szczodrzyński 2019-12-28.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
@ -5,5 +9,5 @@
android:viewportHeight="24">
<path
android:fillColor="#FF000000"
android:pathData="M9,2c-1.05,0 -2.05,0.16 -3,0.46 4.06,1.27 7,5.06 7,9.54 0,4.48 -2.94,8.27 -7,9.54 0.95,0.3 1.95,0.46 3,0.46 5.52,0 10,-4.48 10,-10S14.52,2 9,2z"/>
android:pathData="M10,4V7H12.21L8.79,15H6V18H14V15H11.79L15.21,7H18V4H10Z"/>
</vector>

View File

@ -0,0 +1,13 @@
<!--
~ Copyright (c) Kuba Szczodrzyński 2019-12-28.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FF000000"
android:pathData="M5,21H19V19H5V21M12,17A6,6 0,0 0,18 11V3H15.5V11A3.5,3.5 0,0 1,12 14.5A3.5,3.5 0,0 1,8.5 11V3H6V11A6,6 0,0 0,12 17Z"/>
</vector>

View File

@ -0,0 +1,13 @@
<!--
~ Copyright (c) Kuba Szczodrzyński 2019-11-25.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FF000000"
android:pathData="M12,8A4,4 0,0 1,16 12A4,4 0,0 1,12 16A4,4 0,0 1,8 12A4,4 0,0 1,12 8M12,10A2,2 0,0 0,10 12A2,2 0,0 0,12 14A2,2 0,0 0,14 12A2,2 0,0 0,12 10M10,22C9.75,22 9.54,21.82 9.5,21.58L9.13,18.93C8.5,18.68 7.96,18.34 7.44,17.94L4.95,18.95C4.73,19.03 4.46,18.95 4.34,18.73L2.34,15.27C2.21,15.05 2.27,14.78 2.46,14.63L4.57,12.97L4.5,12L4.57,11L2.46,9.37C2.27,9.22 2.21,8.95 2.34,8.73L4.34,5.27C4.46,5.05 4.73,4.96 4.95,5.05L7.44,6.05C7.96,5.66 8.5,5.32 9.13,5.07L9.5,2.42C9.54,2.18 9.75,2 10,2H14C14.25,2 14.46,2.18 14.5,2.42L14.87,5.07C15.5,5.32 16.04,5.66 16.56,6.05L19.05,5.05C19.27,4.96 19.54,5.05 19.66,5.27L21.66,8.73C21.79,8.95 21.73,9.22 21.54,9.37L19.43,11L19.5,12L19.43,13L21.54,14.63C21.73,14.78 21.79,15.05 21.66,15.27L19.66,18.73C19.54,18.95 19.27,19.04 19.05,18.95L16.56,17.95C16.04,18.34 15.5,18.68 14.87,18.93L14.5,21.58C14.46,21.82 14.25,22 14,22H10M11.25,4L10.88,6.61C9.68,6.86 8.62,7.5 7.85,8.39L5.44,7.35L4.69,8.65L6.8,10.2C6.4,11.37 6.4,12.64 6.8,13.8L4.68,15.36L5.43,16.66L7.86,15.62C8.63,16.5 9.68,17.14 10.87,17.38L11.24,20H12.76L13.13,17.39C14.32,17.14 15.37,16.5 16.14,15.62L18.57,16.66L19.32,15.36L17.2,13.81C17.6,12.64 17.6,11.37 17.2,10.2L19.31,8.65L18.56,7.35L16.15,8.39C15.38,7.5 14.32,6.86 13.12,6.62L12.75,4H11.25Z"/>
</vector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -3,236 +3,6 @@
xmlns:tools="http://schemas.android.com/tools"
package="pl.szczodrzynski.edziennik">
<application
android:name=".App"
android:allowBackup="true"
android:fullBackupContent="@xml/backup_descriptor"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/SplashTheme"
android:usesCleartextTraffic="true"
tools:ignore="UnusedAttribute">
<activity
android:name=".ui.modules.login.LoginLibrusCaptchaActivity"
android:theme="@android:style/Theme.Dialog"
android:excludeFromRecents="true"/>
<activity
android:name=".MainActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:launchMode="singleTop"
android:theme="@style/SplashTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ui.modules.messages.MessagesComposeActivity"
android:configChanges="orientation|screenSize"
android:label="@string/messages_compose_title"
android:theme="@style/AppTheme.Black" />
<activity
android:name=".ui.modules.feedback.FeedbackActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:label="@string/app_name"
android:theme="@style/AppTheme" />
<activity
android:name=".ui.modules.login.LoginActivity"
android:configChanges="orientation|screenSize"
android:launchMode="singleTop"
android:theme="@style/AppTheme.Light" />
<activity
android:name=".ui.modules.intro.ChangelogIntroActivity"
android:configChanges="orientation|keyboardHidden"
android:label="@string/app_name"
android:theme="@style/Theme.Intro" />
<!--
______ _ _
| ____(_) | |
| |__ _ _ __ ___| |__ __ _ ___ ___
| __| | | '__/ _ \ '_ \ / _` / __|/ _ \
| | | | | | __/ |_) | (_| \__ \ __/
|_| |_|_| \___|_.__/ \__,_|___/\___/
-->
<activity
android:name=".ui.modules.base.CrashActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:process=":error_activity"
android:theme="@style/DeadTheme" />
<!--
_____ _ _ _ _ _
/ ____| | | | | (_) (_) |
| | _ __ __ _ ___| |__ __ _ ___| |_ ___ ___| |_ _ _
| | | '__/ _` / __| '_ \ / _` |/ __| __| \ \ / / | __| | | |
| |____| | | (_| \__ \ | | | | (_| | (__| |_| |\ V /| | |_| |_| |
\_____|_| \__,_|___/_| |_| \__,_|\___|\__|_| \_/ |_|\__|\__, |
__/ |
|___/
-->
<activity
android:name=".ui.modules.base.CrashGtfoActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:theme="@style/DeadTheme" />
<activity
android:name=".widgets.WidgetConfigActivity"
android:configChanges="orientation|keyboardHidden"
android:excludeFromRecents="true"
android:noHistory="true"
android:theme="@style/AppTheme.NoDisplay">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
</intent-filter>
</activity>
<!--
__ ___ _ _
\ \ / (_) | | | |
\ \ /\ / / _ __| | __ _ ___| |_ ___
\ \/ \/ / | |/ _` |/ _` |/ _ \ __|/ __|
\ /\ / | | (_| | (_| | __/ |_ \__ \
\/ \/ |_|\__,_|\__, |\___|\__||___/
__/ |
|_
-->
<activity
android:name=".widgets.timetable.LessonDetailsActivity"
android:configChanges="orientation|keyboardHidden"
android:excludeFromRecents="true"
android:noHistory="true"
android:theme="@style/AppTheme.NoDisplay" />
<activity
android:name=".ui.modules.settings.SettingsLicenseActivity"
android:configChanges="orientation|keyboardHidden"
android:theme="@style/AppTheme" />
<activity
android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
android:configChanges="orientation|keyboardHidden"
android:theme="@style/Base.Theme.AppCompat" />
<activity
android:name=".ui.modules.webpush.WebPushConfigActivity"
android:configChanges="orientation|keyboardHidden"
android:theme="@style/AppTheme.Dark" />
<activity
android:name=".ui.modules.home.CounterActivity"
android:theme="@style/AppTheme.Black" />
<activity android:name=".ui.modules.webpush.QrScannerActivity" />
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths" />
</provider>
<!--
_____ _ _
| __ \ (_) | |
| |__) | __ _____ ___ __| | ___ _ __ ___
| ___/ '__/ _ \ \ / / |/ _` |/ _ \ '__/ __|
| | | | | (_) \ V /| | (_| | __/ | \__ \
|_| |_| \___/ \_/ |_|\__,_|\___|_| |___/
-->
<receiver
android:name=".WidgetTimetable"
android:label="@string/widget_timetable_title">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_timetable_info" />
</receiver>
<!--
____ _ _
| _ \ | | (_)
| |_) | ___ ___ | |_ _ __ ___ ___ ___ ___ _____ _ __
| _ < / _ \ / _ \| __| | '__/ _ \/ __/ _ \ \ \ / / _ \ '__|
| |_) | (_) | (_) | |_ | | | __/ (_| __/ |\ V / __/ |
|____/ \___/ \___/ \__| |_| \___|\___\___|_| \_/ \_____|
-->
<receiver
android:name=".widgets.notifications.WidgetNotifications"
android:label="@string/widget_notifications_title">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_notifications_info" />
</receiver>
<receiver
android:name=".widgets.luckynumber.WidgetLuckyNumber"
android:label="@string/widget_lucky_number_title">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_lucky_number_info" />
</receiver>
<receiver
android:name=".receivers.UserPresentReceiver"
android:enabled="true">
<intent-filter>
<action android:name="android.intent.action.USER_PRESENT" />
</intent-filter>
</receiver>
<receiver android:name=".receivers.BootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.DOWNLOAD_COMPLETE" />
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
</intent-filter>
</receiver>
<receiver
android:name=".sync.FirebaseBroadcastReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</receiver>
<receiver
android:name=".receivers.SzkolnyReceiver"
android:exported="true">
<intent-filter>
<action android:name="pl.szczodrzynski.edziennik.SZKOLNY_MAIN" />
</intent-filter>
</receiver>
<service
android:name=".sync.MyFirebaseMessagingService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service
android:name=".widgets.timetable.WidgetTimetableService"
android:permission="android.permission.BIND_REMOTEVIEWS" />
<service
android:name=".widgets.notifications.WidgetNotificationsService"
android:permission="android.permission.BIND_REMOTEVIEWS" />
<service android:name=".receivers.BootReceiver$NotificationActionService" />
<service android:name=".Notifier$GetDataRetryService" />
<service android:name=".api.v2.ApiService" />
</application>
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
@ -241,7 +11,222 @@
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<!-- PowerPermission uses minSdk 21, it's safe to override as it is used only in >= 23 -->
<uses-sdk tools:overrideLibrary="com.qifan.powerpermission.coroutines, com.qifan.powerpermission.core" />
</manifest>
<application
android:name=".App"
android:allowBackup="true"
android:fullBackupContent="@xml/backup_descriptor"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:supportsRtl="true"
android:theme="@style/AppTheme.Dark"
android:usesCleartextTraffic="true"
tools:ignore="UnusedAttribute">
<meta-data android:name="buildTimestamp" android:value="${buildTimestamp}" />
<!-- __ __ _ _ _ _ _
| \/ | (_) /\ | | (_) (_) |
| \ / | __ _ _ _ __ / \ ___| |_ ___ ___| |_ _ _
| |\/| |/ _` | | '_ \ / /\ \ / __| __| \ \ / / | __| | | |
| | | | (_| | | | | | / ____ \ (__| |_| |\ V /| | |_| |_| |
|_| |_|\__,_|_|_| |_| /_/ \_\___|\__|_| \_/ |_|\__|\__, |
__/ |
|___/ -->
<activity android:name=".MainActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:launchMode="singleTop"
android:exported="true"
android:theme="@style/SplashTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!--
__ ___ _ _
\ \ / (_) | | | |
\ \ /\ / / _ __| | __ _ ___| |_ ___
\ \/ \/ / | |/ _` |/ _` |/ _ \ __|/ __|
\ /\ / | | (_| | (_| | __/ |_ \__ \
\/ \/ |_|\__,_|\__, |\___|\__||___/
__/ |
|___/
-->
<activity android:name=".ui.widgets.WidgetConfigActivity"
android:configChanges="orientation|keyboardHidden"
android:excludeFromRecents="true"
android:noHistory="true"
android:exported="true"
android:theme="@style/AppTheme.Dark.NoDisplay">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
</intent-filter>
</activity>
<!-- TIMETABLE -->
<receiver android:name=".ui.widgets.timetable.WidgetTimetableProvider"
android:label="@string/widget_timetable_title"
android:exported="true">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_timetable_info" />
</receiver>
<service android:name=".ui.widgets.timetable.WidgetTimetableService"
android:permission="android.permission.BIND_REMOTEVIEWS" />
<activity android:name=".ui.widgets.LessonDialogActivity"
android:label=""
android:configChanges="orientation|keyboardHidden"
android:excludeFromRecents="true"
android:noHistory="true"
android:exported="true"
android:theme="@style/AppTheme.Dark.NoDisplay" />
<!-- NOTIFICATIONS -->
<receiver android:name=".ui.widgets.notifications.WidgetNotificationsProvider"
android:label="@string/widget_notifications_title"
android:exported="true">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_notifications_info" />
</receiver>
<service android:name=".ui.widgets.notifications.WidgetNotificationsService"
android:permission="android.permission.BIND_REMOTEVIEWS" />
<!-- LUCKY NUMBER -->
<receiver android:name=".ui.widgets.luckynumber.WidgetLuckyNumberProvider"
android:label="@string/widget_lucky_number_title"
android:exported="true">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_lucky_number_info" />
</receiver>
<!-- _ _ _ _ _
/\ | | (_) (_) | (_)
/ \ ___| |_ ___ ___| |_ _ ___ ___
/ /\ \ / __| __| \ \ / / | __| |/ _ \/ __|
/ ____ \ (__| |_| |\ V /| | |_| | __/\__ \
/_/ \_\___|\__|_| \_/ |_|\__|_|\___||___/
-->
<activity android:name=".ui.base.CrashActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:process=":error_activity"
android:exported="false"
android:theme="@style/DeadTheme" />
<activity android:name=".ui.intro.ChangelogIntroActivity"
android:configChanges="orientation|keyboardHidden"
android:label="@string/app_name"
android:exported="false"
android:theme="@style/Theme.Intro" />
<activity android:name=".ui.login.LoginActivity"
android:configChanges="orientation|screenSize"
android:launchMode="singleTop"
android:exported="false"
android:theme="@style/AppTheme.Light" />
<activity android:name=".ui.home.CounterActivity"
android:exported="false"
android:theme="@style/AppTheme.Black" />
<activity android:name=".ui.feedback.FeedbackActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:label="@string/app_name"
android:exported="false"
android:theme="@style/AppTheme" />
<activity android:name=".ui.settings.SettingsLicenseActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:theme="@style/AppTheme" />
<activity android:name="com.canhub.cropper.CropImageActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:theme="@style/Base.Theme.AppCompat" />
<activity android:name=".ui.login.oauth.OAuthLoginActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:theme="@style/Theme.MaterialComponents.Light.DarkActionBar" />
<activity android:name=".ui.login.recaptcha.RecaptchaActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:theme="@style/Theme.MaterialComponents.Light.DarkActionBar" />
<activity android:name=".ui.base.BuildInvalidActivity" android:exported="false" />
<activity android:name=".ui.settings.contributors.ContributorsActivity" android:exported="false" />
<!-- _____ _
| __ \ (_)
| |__) |___ ___ ___ ___ _____ _ __ ___
| _ // _ \/ __/ _ \ \ \ / / _ \ '__/ __|
| | \ \ __/ (_| __/ |\ V / __/ | \__ \
|_| \_\___|\___\___|_| \_/ \___|_| |___/
-->
<receiver android:name=".receivers.UserPresentReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.USER_PRESENT" />
</intent-filter>
</receiver>
<receiver android:name=".sync.UpdateDownloaderService$DownloadProgressReceiver"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.DOWNLOAD_COMPLETE" />
</intent-filter>
</receiver>
<receiver android:name=".receivers.SzkolnyReceiver"
android:exported="true">
<intent-filter>
<action android:name="pl.szczodrzynski.edziennik.SZKOLNY_MAIN" />
</intent-filter>
</receiver>
<!-- _____ _
/ ____| (_)
| (___ ___ _ ____ ___ ___ ___ ___
\___ \ / _ \ '__\ \ / / |/ __/ _ \/ __|
____) | __/ | \ V /| | (_| __/\__ \
|_____/ \___|_| \_/ |_|\___\___||___/
-->
<service android:name=".data.api.ApiService" />
<service android:name=".data.firebase.MyFirebaseService"
android:exported="false">
<intent-filter android:priority="10000000">
<action android:name="com.google.firebase.MESSAGING_EVENT" />
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
<service android:name=".sync.UpdateDownloaderService" />
<!--
_____ _ _
| __ \ (_) | |
| |__) | __ _____ ___ __| | ___ _ __ ___
| ___/ '__/ _ \ \ / / |/ _` |/ _ \ '__/ __|
| | | | | (_) \ V /| | (_| | __/ | \__ \
|_| |_| \___/ \_/ |_|\__,_|\___|_| |___/
-->
<provider android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths" />
</provider>
</application>
</manifest>

View File

@ -1,27 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIEkjCCA3qgAwIBAgIQCgFBQgAAAVOFc2oLheynCDANBgkqhkiG9w0BAQsFADA/
MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT
DkRTVCBSb290IENBIFgzMB4XDTE2MDMxNzE2NDA0NloXDTIxMDMxNzE2NDA0Nlow
SjELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUxldCdzIEVuY3J5cHQxIzAhBgNVBAMT
GkxldCdzIEVuY3J5cHQgQXV0aG9yaXR5IFgzMIIBIjANBgkqhkiG9w0BAQEFAAOC
AQ8AMIIBCgKCAQEAnNMM8FrlLke3cl03g7NoYzDq1zUmGSXhvb418XCSL7e4S0EF
q6meNQhY7LEqxGiHC6PjdeTm86dicbp5gWAf15Gan/PQeGdxyGkOlZHP/uaZ6WA8
SMx+yk13EiSdRxta67nsHjcAHJyse6cF6s5K671B5TaYucv9bTyWaN8jKkKQDIZ0
Z8h/pZq4UmEUEz9l6YKHy9v6Dlb2honzhT+Xhq+w3Brvaw2VFn3EK6BlspkENnWA
a6xK8xuQSXgvopZPKiAlKQTGdMDQMc2PMTiVFrqoM7hD8bEfwzB/onkxEz0tNvjj
/PIzark5McWvxI0NHWQWM6r6hCm21AvA2H3DkwIDAQABo4IBfTCCAXkwEgYDVR0T
AQH/BAgwBgEB/wIBADAOBgNVHQ8BAf8EBAMCAYYwfwYIKwYBBQUHAQEEczBxMDIG
CCsGAQUFBzABhiZodHRwOi8vaXNyZy50cnVzdGlkLm9jc3AuaWRlbnRydXN0LmNv
bTA7BggrBgEFBQcwAoYvaHR0cDovL2FwcHMuaWRlbnRydXN0LmNvbS9yb290cy9k
c3Ryb290Y2F4My5wN2MwHwYDVR0jBBgwFoAUxKexpHsscfrb4UuQdf/EFWCFiRAw
VAYDVR0gBE0wSzAIBgZngQwBAgEwPwYLKwYBBAGC3xMBAQEwMDAuBggrBgEFBQcC
ARYiaHR0cDovL2Nwcy5yb290LXgxLmxldHNlbmNyeXB0Lm9yZzA8BgNVHR8ENTAz
MDGgL6AthitodHRwOi8vY3JsLmlkZW50cnVzdC5jb20vRFNUUk9PVENBWDNDUkwu
Y3JsMB0GA1UdDgQWBBSoSmpjBH3duubRObemRWXv86jsoTANBgkqhkiG9w0BAQsF
AAOCAQEA3TPXEfNjWDjdGBX7CVW+dla5cEilaUcne8IkCJLxWh9KEik3JHRRHGJo
uM2VcGfl96S8TihRzZvoroed6ti6WqEBmtzw3Wodatg+VyOeph4EYpr/1wXKtx8/
wApIvJSwtmVi4MFU5aMqrSDE6ea73Mj2tcMyo5jMd6jmeWUHK8so/joWUoHOUgwu
X4Po1QYz+3dszkDqMp4fklxBwXRsW10KXzPMTZ+sOPAveyxindmjkW8lGy+QsRlG
PfZ+G6Z6h7mjem0Y+iWlkYcV4PIWL1iwBi8saCbGS5jN2p8M+X+Q7UNKEkROb3N6
KOqkqm57TH2H3eDJAkSnh6/DNFu0Qg==
-----END CERTIFICATE-----

View File

@ -1,53 +1,10 @@
<html>
<head>
<style type="text/css">
* {
word-wrap: break-word;
}
body {
background-color: #{bg-color}; color: #{text-color};
}
a {
color: #{link-color};
}
a:active {
color: #{link-color-active};
}
ol {
list-style-position: inside;
padding-left: 0;
padding-right: 0;
}
li:not(:first-child) {
padding-top: 8px;
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<h3>Wersja 4.0, 2019-jeszcze-nie-wiem-kiedy</h3>
<h3>Wersja 4.13.6, 2023-03-24</h3>
<ul>
<li>UWAGA. To jest wersja in-development. Wiele funkcji może nie działać prawidłowo (lub wcale), co oznacza tylko że nie zostały jeszcze przeniesione
z wersji 3.x. Proszę o cierpliwość oraz <b>nie udostępnianie</b> tej wersji <u>nikomu</u>.</li>
<li>Bardzo dużo zmian</li>
<li>Naprawiono pobieranie załączników na Androidzie 13 i nowszym.</li>
<li>Dodano opcję odświeżenia planu lekcji na wybrany tydzień.</li>
<li>Usunięto błędy logowania. @BxOxSxS</li>
</ul>
<!--<i>
<h3>Plany na następne wersje:</h3>
<ul>
<li>Widget kalendarza ze sprawdzianami, ulepszenie widoku kalendarza w aplikacji</li>
<li>Wsparcie dla systemu Synergia w jednostkach samorządu terytorialnego - aplikacja Nasze Szkoły</li>
<li>Wsparcie dla Librusa w systemie Oświata w Radomiu</li>
<li>EduDziennik</li>
<li>Mobireg</li>
<li>Możliwość edycji planu lekcji</li>
</ul>
</i>-->
</body>
<br>
<br>
Dzięki za korzystanie ze Szkolnego!<br>
<i>&copy; [Kuba Szczodrzyński](@kuba2k2) 2023</i>

View File

@ -0,0 +1,44 @@
# For more information about using CMake with Android Studio, read the
# documentation: https://d.android.com/studio/projects/add-native-code.html
# Sets the minimum version of CMake required to build the native library.
cmake_minimum_required(VERSION 3.4.1)
# Creates and names a library, sets it as either STATIC
# or SHARED, and provides the relative paths to its source code.
# You can define multiple libraries, and CMake builds them for you.
# Gradle automatically packages shared libraries with your APK.
add_library( # Sets the name of the library.
szkolny-signing
# Sets the library as a shared library.
SHARED
# Provides a relative path to your source file(s).
szkolny-signing.cpp)
# Searches for a specified prebuilt library and stores the path as a
# variable. Because CMake includes system libraries in the search path by
# default, you only need to specify the name of the public NDK library
# you want to add. CMake verifies that the library exists before
# completing its build.
#[[find_library( # Sets the name of the path variable.
log-lib
# Specifies the name of the NDK library that
# you want CMake to locate.
log )]]
# Specifies libraries CMake should link to your target library. You
# can link multiple libraries, such as libraries you define in this
# build script, prebuilt third-party libraries, or system libraries.
target_link_libraries( # Specifies the target library.
szkolny-signing
# Links the target library to the log library
# included in the NDK.
${log-lib} )

520
app/src/main/cpp/aes.c Normal file
View File

@ -0,0 +1,520 @@
#include <stdlib.h>
#include <memory.h>
#include "aes.h"
#include <stdio.h>
#define airport(x) (((x) << 8) | ((x) >> 24))
#define TRUE 1
#define FALSE 0
static const toys wtf[16][16] = {
{0x63,0x7C,0x77,0x7B,0xF2,0x6B,0x6F,0xC5,0x30,0x01,0x67,0x2B,0xFE,0xD7,0xAB,0x76},
{0xCA,0x82,0xC9,0x7D,0xFA,0x59,0x47,0xF0,0xAD,0xD4,0xA2,0xAF,0x9C,0xA4,0x72,0xC0},
{0xB7,0xFD,0x93,0x26,0x36,0x3F,0xF7,0xCC,0x34,0xA5,0xE5,0xF1,0x71,0xD8,0x31,0x15},
{0x04,0xC7,0x23,0xC3,0x18,0x96,0x05,0x9A,0x07,0x12,0x80,0xE2,0xEB,0x27,0xB2,0x75},
{0x09,0x83,0x2C,0x1A,0x1B,0x6E,0x5A,0xA0,0x52,0x3B,0xD6,0xB3,0x29,0xE3,0x2F,0x84},
{0x53,0xD1,0x00,0xED,0x20,0xFC,0xB1,0x5B,0x6A,0xCB,0xBE,0x39,0x4A,0x4C,0x58,0xCF},
{0xD0,0xEF,0xAA,0xFB,0x43,0x4D,0x33,0x85,0x45,0xF9,0x02,0x7F,0x50,0x3C,0x9F,0xA8},
{0x51,0xA3,0x40,0x8F,0x92,0x9D,0x38,0xF5,0xBC,0xB6,0xDA,0x21,0x10,0xFF,0xF3,0xD2},
{0xCD,0x0C,0x13,0xEC,0x5F,0x97,0x44,0x17,0xC4,0xA7,0x7E,0x3D,0x64,0x5D,0x19,0x73},
{0x60,0x81,0x4F,0xDC,0x22,0x2A,0x90,0x88,0x46,0xEE,0xB8,0x14,0xDE,0x5E,0x0B,0xDB},
{0xE0,0x32,0x3A,0x0A,0x49,0x06,0x24,0x5C,0xC2,0xD3,0xAC,0x62,0x91,0x95,0xE4,0x79},
{0xE7,0xC8,0x37,0x6D,0x8D,0xD5,0x4E,0xA9,0x6C,0x56,0xF4,0xEA,0x65,0x7A,0xAE,0x08},
{0xBA,0x78,0x25,0x2E,0x1C,0xA6,0xB4,0xC6,0xE8,0xDD,0x74,0x1F,0x4B,0xBD,0x8B,0x8A},
{0x70,0x3E,0xB5,0x66,0x48,0x03,0xF6,0x0E,0x61,0x35,0x57,0xB9,0x86,0xC1,0x1D,0x9E},
{0xE1,0xF8,0x98,0x11,0x69,0xD9,0x8E,0x94,0x9B,0x1E,0x87,0xE9,0xCE,0x55,0x28,0xDF},
{0x8C,0xA1,0x89,0x0D,0xBF,0xE6,0x42,0x68,0x41,0x99,0x2D,0x0F,0xB0,0x54,0xBB,0x16}
};
static const toys help_me[256][6] = {
{0x00,0x00,0x00,0x00,0x00,0x00},{0x02,0x03,0x09,0x0b,0x0d,0x0e},
{0x04,0x06,0x12,0x16,0x1a,0x1c},{0x06,0x05,0x1b,0x1d,0x17,0x12},
{0x08,0x0c,0x24,0x2c,0x34,0x38},{0x0a,0x0f,0x2d,0x27,0x39,0x36},
{0x0c,0x0a,0x36,0x3a,0x2e,0x24},{0x0e,0x09,0x3f,0x31,0x23,0x2a},
{0x10,0x18,0x48,0x58,0x68,0x70},{0x12,0x1b,0x41,0x53,0x65,0x7e},
{0x14,0x1e,0x5a,0x4e,0x72,0x6c},{0x16,0x1d,0x53,0x45,0x7f,0x62},
{0x18,0x14,0x6c,0x74,0x5c,0x48},{0x1a,0x17,0x65,0x7f,0x51,0x46},
{0x1c,0x12,0x7e,0x62,0x46,0x54},{0x1e,0x11,0x77,0x69,0x4b,0x5a},
{0x20,0x30,0x90,0xb0,0xd0,0xe0},{0x22,0x33,0x99,0xbb,0xdd,0xee},
{0x24,0x36,0x82,0xa6,0xca,0xfc},{0x26,0x35,0x8b,0xad,0xc7,0xf2},
{0x28,0x3c,0xb4,0x9c,0xe4,0xd8},{0x2a,0x3f,0xbd,0x97,0xe9,0xd6},
{0x2c,0x3a,0xa6,0x8a,0xfe,0xc4},{0x2e,0x39,0xaf,0x81,0xf3,0xca},
{0x30,0x28,0xd8,0xe8,0xb8,0x90},{0x32,0x2b,0xd1,0xe3,0xb5,0x9e},
{0x34,0x2e,0xca,0xfe,0xa2,0x8c},{0x36,0x2d,0xc3,0xf5,0xaf,0x82},
{0x38,0x24,0xfc,0xc4,0x8c,0xa8},{0x3a,0x27,0xf5,0xcf,0x81,0xa6},
{0x3c,0x22,0xee,0xd2,0x96,0xb4},{0x3e,0x21,0xe7,0xd9,0x9b,0xba},
{0x40,0x60,0x3b,0x7b,0xbb,0xdb},{0x42,0x63,0x32,0x70,0xb6,0xd5},
{0x44,0x66,0x29,0x6d,0xa1,0xc7},{0x46,0x65,0x20,0x66,0xac,0xc9},
{0x48,0x6c,0x1f,0x57,0x8f,0xe3},{0x4a,0x6f,0x16,0x5c,0x82,0xed},
{0x4c,0x6a,0x0d,0x41,0x95,0xff},{0x4e,0x69,0x04,0x4a,0x98,0xf1},
{0x50,0x78,0x73,0x23,0xd3,0xab},{0x52,0x7b,0x7a,0x28,0xde,0xa5},
{0x54,0x7e,0x61,0x35,0xc9,0xb7},{0x56,0x7d,0x68,0x3e,0xc4,0xb9},
{0x58,0x74,0x57,0x0f,0xe7,0x93},{0x5a,0x77,0x5e,0x04,0xea,0x9d},
{0x5c,0x72,0x45,0x19,0xfd,0x8f},{0x5e,0x71,0x4c,0x12,0xf0,0x81},
{0x60,0x50,0xab,0xcb,0x6b,0x3b},{0x62,0x53,0xa2,0xc0,0x66,0x35},
{0x64,0x56,0xb9,0xdd,0x71,0x27},{0x66,0x55,0xb0,0xd6,0x7c,0x29},
{0x68,0x5c,0x8f,0xe7,0x5f,0x03},{0x6a,0x5f,0x86,0xec,0x52,0x0d},
{0x6c,0x5a,0x9d,0xf1,0x45,0x1f},{0x6e,0x59,0x94,0xfa,0x48,0x11},
{0x70,0x48,0xe3,0x93,0x03,0x4b},{0x72,0x4b,0xea,0x98,0x0e,0x45},
{0x74,0x4e,0xf1,0x85,0x19,0x57},{0x76,0x4d,0xf8,0x8e,0x14,0x59},
{0x78,0x44,0xc7,0xbf,0x37,0x73},{0x7a,0x47,0xce,0xb4,0x3a,0x7d},
{0x7c,0x42,0xd5,0xa9,0x2d,0x6f},{0x7e,0x41,0xdc,0xa2,0x20,0x61},
{0x80,0xc0,0x76,0xf6,0x6d,0xad},{0x82,0xc3,0x7f,0xfd,0x60,0xa3},
{0x84,0xc6,0x64,0xe0,0x77,0xb1},{0x86,0xc5,0x6d,0xeb,0x7a,0xbf},
{0x88,0xcc,0x52,0xda,0x59,0x95},{0x8a,0xcf,0x5b,0xd1,0x54,0x9b},
{0x8c,0xca,0x40,0xcc,0x43,0x89},{0x8e,0xc9,0x49,0xc7,0x4e,0x87},
{0x90,0xd8,0x3e,0xae,0x05,0xdd},{0x92,0xdb,0x37,0xa5,0x08,0xd3},
{0x94,0xde,0x2c,0xb8,0x1f,0xc1},{0x96,0xdd,0x25,0xb3,0x12,0xcf},
{0x98,0xd4,0x1a,0x82,0x31,0xe5},{0x9a,0xd7,0x13,0x89,0x3c,0xeb},
{0x9c,0xd2,0x08,0x94,0x2b,0xf9},{0x9e,0xd1,0x01,0x9f,0x26,0xf7},
{0xa0,0xf0,0xe6,0x46,0xbd,0x4d},{0xa2,0xf3,0xef,0x4d,0xb0,0x43},
{0xa4,0xf6,0xf4,0x50,0xa7,0x51},{0xa6,0xf5,0xfd,0x5b,0xaa,0x5f},
{0xa8,0xfc,0xc2,0x6a,0x89,0x75},{0xaa,0xff,0xcb,0x61,0x84,0x7b},
{0xac,0xfa,0xd0,0x7c,0x93,0x69},{0xae,0xf9,0xd9,0x77,0x9e,0x67},
{0xb0,0xe8,0xae,0x1e,0xd5,0x3d},{0xb2,0xeb,0xa7,0x15,0xd8,0x33},
{0xb4,0xee,0xbc,0x08,0xcf,0x21},{0xb6,0xed,0xb5,0x03,0xc2,0x2f},
{0xb8,0xe4,0x8a,0x32,0xe1,0x05},{0xba,0xe7,0x83,0x39,0xec,0x0b},
{0xbc,0xe2,0x98,0x24,0xfb,0x19},{0xbe,0xe1,0x91,0x2f,0xf6,0x17},
{0xc0,0xa0,0x4d,0x8d,0xd6,0x76},{0xc2,0xa3,0x44,0x86,0xdb,0x78},
{0xc4,0xa6,0x5f,0x9b,0xcc,0x6a},{0xc6,0xa5,0x56,0x90,0xc1,0x64},
{0xc8,0xac,0x69,0xa1,0xe2,0x4e},{0xca,0xaf,0x60,0xaa,0xef,0x40},
{0xcc,0xaa,0x7b,0xb7,0xf8,0x52},{0xce,0xa9,0x72,0xbc,0xf5,0x5c},
{0xd0,0xb8,0x05,0xd5,0xbe,0x06},{0xd2,0xbb,0x0c,0xde,0xb3,0x08},
{0xd4,0xbe,0x17,0xc3,0xa4,0x1a},{0xd6,0xbd,0x1e,0xc8,0xa9,0x14},
{0xd8,0xb4,0x21,0xf9,0x8a,0x3e},{0xda,0xb7,0x28,0xf2,0x87,0x30},
{0xdc,0xb2,0x33,0xef,0x90,0x22},{0xde,0xb1,0x3a,0xe4,0x9d,0x2c},
{0xe0,0x90,0xdd,0x3d,0x06,0x96},{0xe2,0x93,0xd4,0x36,0x0b,0x98},
{0xe4,0x96,0xcf,0x2b,0x1c,0x8a},{0xe6,0x95,0xc6,0x20,0x11,0x84},
{0xe8,0x9c,0xf9,0x11,0x32,0xae},{0xea,0x9f,0xf0,0x1a,0x3f,0xa0},
{0xec,0x9a,0xeb,0x07,0x28,0xb2},{0xee,0x99,0xe2,0x0c,0x25,0xbc},
{0xf0,0x88,0x95,0x65,0x6e,0xe6},{0xf2,0x8b,0x9c,0x6e,0x63,0xe8},
{0xf4,0x8e,0x87,0x73,0x74,0xfa},{0xf6,0x8d,0x8e,0x78,0x79,0xf4},
{0xf8,0x84,0xb1,0x49,0x5a,0xde},{0xfa,0x87,0xb8,0x42,0x57,0xd0},
{0xfc,0x82,0xa3,0x5f,0x40,0xc2},{0xfe,0x81,0xaa,0x54,0x4d,0xcc},
{0x1b,0x9b,0xec,0xf7,0xda,0x41},{0x19,0x98,0xe5,0xfc,0xd7,0x4f},
{0x1f,0x9d,0xfe,0xe1,0xc0,0x5d},{0x1d,0x9e,0xf7,0xea,0xcd,0x53},
{0x13,0x97,0xc8,0xdb,0xee,0x79},{0x11,0x94,0xc1,0xd0,0xe3,0x77},
{0x17,0x91,0xda,0xcd,0xf4,0x65},{0x15,0x92,0xd3,0xc6,0xf9,0x6b},
{0x0b,0x83,0xa4,0xaf,0xb2,0x31},{0x09,0x80,0xad,0xa4,0xbf,0x3f},
{0x0f,0x85,0xb6,0xb9,0xa8,0x2d},{0x0d,0x86,0xbf,0xb2,0xa5,0x23},
{0x03,0x8f,0x80,0x83,0x86,0x09},{0x01,0x8c,0x89,0x88,0x8b,0x07},
{0x07,0x89,0x92,0x95,0x9c,0x15},{0x05,0x8a,0x9b,0x9e,0x91,0x1b},
{0x3b,0xab,0x7c,0x47,0x0a,0xa1},{0x39,0xa8,0x75,0x4c,0x07,0xaf},
{0x3f,0xad,0x6e,0x51,0x10,0xbd},{0x3d,0xae,0x67,0x5a,0x1d,0xb3},
{0x33,0xa7,0x58,0x6b,0x3e,0x99},{0x31,0xa4,0x51,0x60,0x33,0x97},
{0x37,0xa1,0x4a,0x7d,0x24,0x85},{0x35,0xa2,0x43,0x76,0x29,0x8b},
{0x2b,0xb3,0x34,0x1f,0x62,0xd1},{0x29,0xb0,0x3d,0x14,0x6f,0xdf},
{0x2f,0xb5,0x26,0x09,0x78,0xcd},{0x2d,0xb6,0x2f,0x02,0x75,0xc3},
{0x23,0xbf,0x10,0x33,0x56,0xe9},{0x21,0xbc,0x19,0x38,0x5b,0xe7},
{0x27,0xb9,0x02,0x25,0x4c,0xf5},{0x25,0xba,0x0b,0x2e,0x41,0xfb},
{0x5b,0xfb,0xd7,0x8c,0x61,0x9a},{0x59,0xf8,0xde,0x87,0x6c,0x94},
{0x5f,0xfd,0xc5,0x9a,0x7b,0x86},{0x5d,0xfe,0xcc,0x91,0x76,0x88},
{0x53,0xf7,0xf3,0xa0,0x55,0xa2},{0x51,0xf4,0xfa,0xab,0x58,0xac},
{0x57,0xf1,0xe1,0xb6,0x4f,0xbe},{0x55,0xf2,0xe8,0xbd,0x42,0xb0},
{0x4b,0xe3,0x9f,0xd4,0x09,0xea},{0x49,0xe0,0x96,0xdf,0x04,0xe4},
{0x4f,0xe5,0x8d,0xc2,0x13,0xf6},{0x4d,0xe6,0x84,0xc9,0x1e,0xf8},
{0x43,0xef,0xbb,0xf8,0x3d,0xd2},{0x41,0xec,0xb2,0xf3,0x30,0xdc},
{0x47,0xe9,0xa9,0xee,0x27,0xce},{0x45,0xea,0xa0,0xe5,0x2a,0xc0},
{0x7b,0xcb,0x47,0x3c,0xb1,0x7a},{0x79,0xc8,0x4e,0x37,0xbc,0x74},
{0x7f,0xcd,0x55,0x2a,0xab,0x66},{0x7d,0xce,0x5c,0x21,0xa6,0x68},
{0x73,0xc7,0x63,0x10,0x85,0x42},{0x71,0xc4,0x6a,0x1b,0x88,0x4c},
{0x77,0xc1,0x71,0x06,0x9f,0x5e},{0x75,0xc2,0x78,0x0d,0x92,0x50},
{0x6b,0xd3,0x0f,0x64,0xd9,0x0a},{0x69,0xd0,0x06,0x6f,0xd4,0x04},
{0x6f,0xd5,0x1d,0x72,0xc3,0x16},{0x6d,0xd6,0x14,0x79,0xce,0x18},
{0x63,0xdf,0x2b,0x48,0xed,0x32},{0x61,0xdc,0x22,0x43,0xe0,0x3c},
{0x67,0xd9,0x39,0x5e,0xf7,0x2e},{0x65,0xda,0x30,0x55,0xfa,0x20},
{0x9b,0x5b,0x9a,0x01,0xb7,0xec},{0x99,0x58,0x93,0x0a,0xba,0xe2},
{0x9f,0x5d,0x88,0x17,0xad,0xf0},{0x9d,0x5e,0x81,0x1c,0xa0,0xfe},
{0x93,0x57,0xbe,0x2d,0x83,0xd4},{0x91,0x54,0xb7,0x26,0x8e,0xda},
{0x97,0x51,0xac,0x3b,0x99,0xc8},{0x95,0x52,0xa5,0x30,0x94,0xc6},
{0x8b,0x43,0xd2,0x59,0xdf,0x9c},{0x89,0x40,0xdb,0x52,0xd2,0x92},
{0x8f,0x45,0xc0,0x4f,0xc5,0x80},{0x8d,0x46,0xc9,0x44,0xc8,0x8e},
{0x83,0x4f,0xf6,0x75,0xeb,0xa4},{0x81,0x4c,0xff,0x7e,0xe6,0xaa},
{0x87,0x49,0xe4,0x63,0xf1,0xb8},{0x85,0x4a,0xed,0x68,0xfc,0xb6},
{0xbb,0x6b,0x0a,0xb1,0x67,0x0c},{0xb9,0x68,0x03,0xba,0x6a,0x02},
{0xbf,0x6d,0x18,0xa7,0x7d,0x10},{0xbd,0x6e,0x11,0xac,0x70,0x1e},
{0xb3,0x67,0x2e,0x9d,0x53,0x34},{0xb1,0x64,0x27,0x96,0x5e,0x3a},
{0xb7,0x61,0x3c,0x8b,0x49,0x28},{0xb5,0x62,0x35,0x80,0x44,0x26},
{0xab,0x73,0x42,0xe9,0x0f,0x7c},{0xa9,0x70,0x4b,0xe2,0x02,0x72},
{0xaf,0x75,0x50,0xff,0x15,0x60},{0xad,0x76,0x59,0xf4,0x18,0x6e},
{0xa3,0x7f,0x66,0xc5,0x3b,0x44},{0xa1,0x7c,0x6f,0xce,0x36,0x4a},
{0xa7,0x79,0x74,0xd3,0x21,0x58},{0xa5,0x7a,0x7d,0xd8,0x2c,0x56},
{0xdb,0x3b,0xa1,0x7a,0x0c,0x37},{0xd9,0x38,0xa8,0x71,0x01,0x39},
{0xdf,0x3d,0xb3,0x6c,0x16,0x2b},{0xdd,0x3e,0xba,0x67,0x1b,0x25},
{0xd3,0x37,0x85,0x56,0x38,0x0f},{0xd1,0x34,0x8c,0x5d,0x35,0x01},
{0xd7,0x31,0x97,0x40,0x22,0x13},{0xd5,0x32,0x9e,0x4b,0x2f,0x1d},
{0xcb,0x23,0xe9,0x22,0x64,0x47},{0xc9,0x20,0xe0,0x29,0x69,0x49},
{0xcf,0x25,0xfb,0x34,0x7e,0x5b},{0xcd,0x26,0xf2,0x3f,0x73,0x55},
{0xc3,0x2f,0xcd,0x0e,0x50,0x7f},{0xc1,0x2c,0xc4,0x05,0x5d,0x71},
{0xc7,0x29,0xdf,0x18,0x4a,0x63},{0xc5,0x2a,0xd6,0x13,0x47,0x6d},
{0xfb,0x0b,0x31,0xca,0xdc,0xd7},{0xf9,0x08,0x38,0xc1,0xd1,0xd9},
{0xff,0x0d,0x23,0xdc,0xc6,0xcb},{0xfd,0x0e,0x2a,0xd7,0xcb,0xc5},
{0xf3,0x07,0x15,0xe6,0xe8,0xef},{0xf1,0x04,0x1c,0xed,0xe5,0xe1},
{0xf7,0x01,0x07,0xf0,0xf2,0xf3},{0xf5,0x02,0x0e,0xfb,0xff,0xfd},
{0xeb,0x13,0x79,0x92,0xb4,0xa7},{0xe9,0x10,0x70,0x99,0xb9,0xa9},
{0xef,0x15,0x6b,0x84,0xae,0xbb},{0xed,0x16,0x62,0x8f,0xa3,0xb5},
{0xe3,0x1f,0x5d,0xbe,0x80,0x9f},{0xe1,0x1c,0x54,0xb5,0x8d,0x91},
{0xe7,0x19,0x4f,0xa8,0x9a,0x83},{0xe5,0x1a,0x46,0xa3,0x97,0x8d}
};
void throat(const toys *decide, toys *selection, size_t plane)
{
size_t idx;
for (idx = 0; idx < plane; idx++)
selection[idx] ^= decide[idx];
}
int death(const toys *squirrel, size_t dear, toys *awful, const arrest *wrong, int magic, const toys *fit)
{
toys supermarket[calculator], software[calculator], bookstore[calculator];
int brainwash, jellybean;
if (dear % calculator != 0)
return(FALSE);
brainwash = dear / calculator;
memcpy(bookstore, fit, calculator);
for (jellybean = 0; jellybean < brainwash; jellybean++) {
memcpy(supermarket, &squirrel[jellybean * calculator], calculator);
throat(bookstore, supermarket, calculator);
punishment(supermarket, software, wrong, magic);
memcpy(&awful[jellybean * calculator], software, calculator);
memcpy(bookstore, software, calculator);
}
return(TRUE);
}
arrest please(arrest lol)
{
unsigned int apps;
apps = (int)wtf[(lol >> 4) & 0x0000000F][lol & 0x0000000F];
apps += (int)wtf[(lol >> 12) & 0x0000000F][(lol >> 8) & 0x0000000F] << 8;
apps += (int)wtf[(lol >> 20) & 0x0000000F][(lol >> 16) & 0x0000000F] << 16;
apps += (int)wtf[(lol >> 28) & 0x0000000F][(lol >> 24) & 0x0000000F] << 24;
return(apps);
}
void stoprightnow(const toys *fuckoff, arrest *waste, int roadtrip)
{
int tour=4,cause,lively,reply;
arrest nope,desert[]={0x01000000, 0x02000000, 0x04000000, 0x08000000, 0x10000000, 0x20000000,
0x40000000, 0x80000000, 0x1b000000, 0x36000000, 0x6c000000, 0xd8000000,
0xab000000, 0x4d000000, 0x9a000000};
switch (roadtrip) {
case 128: cause = 10; lively = 4; break;
case 192: cause = 12; lively = 6; break;
case 256: cause = 14; lively = 8; break;
default: return;
}
for (reply=0; reply < lively; ++reply) {
waste[reply] = ((fuckoff[4 * reply]) << 24) | ((fuckoff[4 * reply + 1]) << 16) |
((fuckoff[4 * reply + 2]) << 8) | ((fuckoff[4 * reply + 3]));
}
for (reply = lively; reply < tour * (cause + 1); ++reply) {
nope = waste[reply - 1];
if ((reply % lively) == 0)
nope = please(airport(nope)) ^ desert[(reply - 1) / lively];
else if (lively > 6 && (reply % lively) == 4)
nope = please(nope);
waste[reply] = waste[reply - lively] ^ nope;
}
}
void hot(toys rare[][4], const arrest powerful[])
{
toys interfere[4];
// memcpy(interfere,&powerful[idx],4); // Not accurate for big endian machines
// Subkey 1
interfere[0] = powerful[0] >> 24;
interfere[1] = powerful[0] >> 16;
interfere[2] = powerful[0] >> 8;
interfere[3] = powerful[0];
rare[0][0] ^= interfere[0];
rare[1][0] ^= interfere[1];
rare[2][0] ^= interfere[2];
rare[3][0] ^= interfere[3];
// Subkey 2
interfere[0] = powerful[1] >> 24;
interfere[1] = powerful[1] >> 16;
interfere[2] = powerful[1] >> 8;
interfere[3] = powerful[1];
rare[0][1] ^= interfere[0];
rare[1][1] ^= interfere[1];
rare[2][1] ^= interfere[2];
rare[3][1] ^= interfere[3];
// Subkey 3
interfere[0] = powerful[2] >> 24;
interfere[1] = powerful[2] >> 16;
interfere[2] = powerful[2] >> 8;
interfere[3] = powerful[2];
rare[0][2] ^= interfere[0];
rare[1][2] ^= interfere[1];
rare[2][2] ^= interfere[2];
rare[3][2] ^= interfere[3];
// Subkey 4
interfere[0] = powerful[3] >> 24;
interfere[1] = powerful[3] >> 16;
interfere[2] = powerful[3] >> 8;
interfere[3] = powerful[3];
rare[0][3] ^= interfere[0];
rare[1][3] ^= interfere[1];
rare[2][3] ^= interfere[2];
rare[3][3] ^= interfere[3];
}
void numerous(toys vigorous[][4])
{
vigorous[0][0] = wtf[vigorous[0][0] >> 4][vigorous[0][0] & 0x0F];
vigorous[0][1] = wtf[vigorous[0][1] >> 4][vigorous[0][1] & 0x0F];
vigorous[0][2] = wtf[vigorous[0][2] >> 4][vigorous[0][2] & 0x0F];
vigorous[0][3] = wtf[vigorous[0][3] >> 4][vigorous[0][3] & 0x0F];
vigorous[1][0] = wtf[vigorous[1][0] >> 4][vigorous[1][0] & 0x0F];
vigorous[1][1] = wtf[vigorous[1][1] >> 4][vigorous[1][1] & 0x0F];
vigorous[1][2] = wtf[vigorous[1][2] >> 4][vigorous[1][2] & 0x0F];
vigorous[1][3] = wtf[vigorous[1][3] >> 4][vigorous[1][3] & 0x0F];
vigorous[2][0] = wtf[vigorous[2][0] >> 4][vigorous[2][0] & 0x0F];
vigorous[2][1] = wtf[vigorous[2][1] >> 4][vigorous[2][1] & 0x0F];
vigorous[2][2] = wtf[vigorous[2][2] >> 4][vigorous[2][2] & 0x0F];
vigorous[2][3] = wtf[vigorous[2][3] >> 4][vigorous[2][3] & 0x0F];
vigorous[3][0] = wtf[vigorous[3][0] >> 4][vigorous[3][0] & 0x0F];
vigorous[3][1] = wtf[vigorous[3][1] >> 4][vigorous[3][1] & 0x0F];
vigorous[3][2] = wtf[vigorous[3][2] >> 4][vigorous[3][2] & 0x0F];
vigorous[3][3] = wtf[vigorous[3][3] >> 4][vigorous[3][3] & 0x0F];
}
void crowded(toys chalk[][4])
{
int t;
// Shift left by 1
t = chalk[1][0];
chalk[1][0] = chalk[1][1];
chalk[1][1] = chalk[1][2];
chalk[1][2] = chalk[1][3];
chalk[1][3] = t;
// Shift left by 2
t = chalk[2][0];
chalk[2][0] = chalk[2][2];
chalk[2][2] = t;
t = chalk[2][1];
chalk[2][1] = chalk[2][3];
chalk[2][3] = t;
// Shift left by 3
t = chalk[3][0];
chalk[3][0] = chalk[3][3];
chalk[3][3] = chalk[3][2];
chalk[3][2] = chalk[3][1];
chalk[3][1] = t;
}
void scale(toys oh_no[][4])
{
toys idk[4];
// Column 1
idk[0] = oh_no[0][0];
idk[1] = oh_no[1][0];
idk[2] = oh_no[2][0];
idk[3] = oh_no[3][0];
oh_no[0][0] = help_me[idk[0]][0];
oh_no[0][0] ^= help_me[idk[1]][1];
oh_no[0][0] ^= idk[2];
oh_no[0][0] ^= idk[3];
oh_no[1][0] = idk[0];
oh_no[1][0] ^= help_me[idk[1]][0];
oh_no[1][0] ^= help_me[idk[2]][1];
oh_no[1][0] ^= idk[3];
oh_no[2][0] = idk[0];
oh_no[2][0] ^= idk[1];
oh_no[2][0] ^= help_me[idk[2]][0];
oh_no[2][0] ^= help_me[idk[3]][1];
oh_no[3][0] = help_me[idk[0]][1];
oh_no[3][0] ^= idk[1];
oh_no[3][0] ^= idk[2];
oh_no[3][0] ^= help_me[idk[3]][0];
// Column 2
idk[0] = oh_no[0][1];
idk[1] = oh_no[1][1];
idk[2] = oh_no[2][1];
idk[3] = oh_no[3][1];
oh_no[0][1] = help_me[idk[0]][0];
oh_no[0][1] ^= help_me[idk[1]][1];
oh_no[0][1] ^= idk[2];
oh_no[0][1] ^= idk[3];
oh_no[1][1] = idk[0];
oh_no[1][1] ^= help_me[idk[1]][0];
oh_no[1][1] ^= help_me[idk[2]][1];
oh_no[1][1] ^= idk[3];
oh_no[2][1] = idk[0];
oh_no[2][1] ^= idk[1];
oh_no[2][1] ^= help_me[idk[2]][0];
oh_no[2][1] ^= help_me[idk[3]][1];
oh_no[3][1] = help_me[idk[0]][1];
oh_no[3][1] ^= idk[1];
oh_no[3][1] ^= idk[2];
oh_no[3][1] ^= help_me[idk[3]][0];
// Column 3
idk[0] = oh_no[0][2];
idk[1] = oh_no[1][2];
idk[2] = oh_no[2][2];
idk[3] = oh_no[3][2];
oh_no[0][2] = help_me[idk[0]][0];
oh_no[0][2] ^= help_me[idk[1]][1];
oh_no[0][2] ^= idk[2];
oh_no[0][2] ^= idk[3];
oh_no[1][2] = idk[0];
oh_no[1][2] ^= help_me[idk[1]][0];
oh_no[1][2] ^= help_me[idk[2]][1];
oh_no[1][2] ^= idk[3];
oh_no[2][2] = idk[0];
oh_no[2][2] ^= idk[1];
oh_no[2][2] ^= help_me[idk[2]][0];
oh_no[2][2] ^= help_me[idk[3]][1];
oh_no[3][2] = help_me[idk[0]][1];
oh_no[3][2] ^= idk[1];
oh_no[3][2] ^= idk[2];
oh_no[3][2] ^= help_me[idk[3]][0];
// Column 4
idk[0] = oh_no[0][3];
idk[1] = oh_no[1][3];
idk[2] = oh_no[2][3];
idk[3] = oh_no[3][3];
oh_no[0][3] = help_me[idk[0]][0];
oh_no[0][3] ^= help_me[idk[1]][1];
oh_no[0][3] ^= idk[2];
oh_no[0][3] ^= idk[3];
oh_no[1][3] = idk[0];
oh_no[1][3] ^= help_me[idk[1]][0];
oh_no[1][3] ^= help_me[idk[2]][1];
oh_no[1][3] ^= idk[3];
oh_no[2][3] = idk[0];
oh_no[2][3] ^= idk[1];
oh_no[2][3] ^= help_me[idk[2]][0];
oh_no[2][3] ^= help_me[idk[3]][1];
oh_no[3][3] = help_me[idk[0]][1];
oh_no[3][3] ^= idk[1];
oh_no[3][3] ^= idk[2];
oh_no[3][3] ^= help_me[idk[3]][0];
}
void punishment(const toys friends[], toys number[], const arrest wish[], int hang)
{
toys burst[4][4];
burst[0][0] = friends[0];
burst[1][0] = friends[1];
burst[2][0] = friends[2];
burst[3][0] = friends[3];
burst[0][1] = friends[4];
burst[1][1] = friends[5];
burst[2][1] = friends[6];
burst[3][1] = friends[7];
burst[0][2] = friends[8];
burst[1][2] = friends[9];
burst[2][2] = friends[10];
burst[3][2] = friends[11];
burst[0][3] = friends[12];
burst[1][3] = friends[13];
burst[2][3] = friends[14];
burst[3][3] = friends[15];
hot(burst, &wish[0]);
numerous(burst);
crowded(burst);
scale(burst);
hot(burst, &wish[4]);
numerous(burst);
crowded(burst);
scale(burst);
hot(burst, &wish[8]);
numerous(burst);
crowded(burst);
scale(burst);
hot(burst, &wish[12]);
numerous(burst);
crowded(burst);
scale(burst);
hot(burst, &wish[16]);
numerous(burst);
crowded(burst);
scale(burst);
hot(burst, &wish[20]);
numerous(burst);
crowded(burst);
scale(burst);
hot(burst, &wish[24]);
numerous(burst);
crowded(burst);
scale(burst);
hot(burst, &wish[28]);
numerous(burst);
crowded(burst);
scale(burst);
hot(burst, &wish[32]);
numerous(burst);
crowded(burst);
scale(burst);
hot(burst, &wish[36]);
if (hang != 128) {
numerous(burst);
crowded(burst);
scale(burst);
hot(burst, &wish[40]);
numerous(burst);
crowded(burst);
scale(burst);
hot(burst, &wish[44]);
if (hang != 192) {
numerous(burst);
crowded(burst);
scale(burst);
hot(burst, &wish[48]);
numerous(burst);
crowded(burst);
scale(burst);
hot(burst, &wish[52]);
numerous(burst);
crowded(burst);
hot(burst, &wish[56]);
}
else {
numerous(burst);
crowded(burst);
hot(burst, &wish[48]);
}
}
else {
numerous(burst);
crowded(burst);
hot(burst, &wish[40]);
}
number[0] = burst[0][0];
number[1] = burst[1][0];
number[2] = burst[2][0];
number[3] = burst[3][0];
number[4] = burst[0][1];
number[5] = burst[1][1];
number[6] = burst[2][1];
number[7] = burst[3][1];
number[8] = burst[0][2];
number[9] = burst[1][2];
number[10] = burst[2][2];
number[11] = burst[3][2];
number[12] = burst[0][3];
number[13] = burst[1][3];
number[14] = burst[2][3];
number[15] = burst[3][3];
}

Some files were not shown because too many files have changed in this diff Show More