Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: open-learning-exchange/myplanet
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.21.9
Choose a base ref
...
head repository: open-learning-exchange/myplanet
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Nov 25, 2024

  1. all: smoother challenge cap (fixes #4803) (#4804)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    Okuro3499 and dogi authored Nov 25, 2024
    Copy the full SHA
    9c6a888 View commit details

Commits on Nov 26, 2024

  1. all: bump media3_version to 1.5.0 (fixes #4809) (#4806)

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: dogi <dogi@users.noreply.github.com>
    dependabot[bot] and dogi authored Nov 26, 2024
    Copy the full SHA
    0f80a0e View commit details

Commits on Nov 27, 2024

  1. teams: smoother members removal (fixes #4802) (#4805)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    deeppp15 and dogi authored Nov 27, 2024
    Copy the full SHA
    c71bedc View commit details

Commits on Dec 2, 2024

  1. teams: smoother leader leaving (fixes #4807) (#4808)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    deeppp15 and dogi authored Dec 2, 2024
    Copy the full SHA
    b9f77df View commit details
  2. teams: smoother last member (fixes #4814) (#4816)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    deeppp15 and dogi authored Dec 2, 2024
    Copy the full SHA
    cd44ec5 View commit details
  3. all: bump kotlin_version to 2.1.0 (fixes #4827) (#4817)

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: dogi <dogi@users.noreply.github.com>
    dependabot[bot] and dogi authored Dec 2, 2024
    Copy the full SHA
    7bd4dd9 View commit details
  4. all: bump org.jetbrains.kotlin:kotlin-bom to 2.1.0 (fixes #4828) (#…

    …4818)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: dogi <dogi@users.noreply.github.com>
    dependabot[bot] and dogi authored Dec 2, 2024
    Copy the full SHA
    53d0cf6 View commit details
  5. all: less build: warnings is more (fixes #4820) (#4823)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    Okuro3499 and dogi authored Dec 2, 2024
    Copy the full SHA
    d9f25fd View commit details
  6. teams: smoother joining (fixes #4815) (#4826)

    Co-authored-by: Gideon Okuro <gideonollonde@gmail.com>
    Co-authored-by: dogi <dogi@users.noreply.github.com>
    3 people authored Dec 2, 2024
    Copy the full SHA
    ba11826 View commit details
  7. sync: smoother url checks (fixes #4824) (#4825)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    Okuro3499 and dogi authored Dec 2, 2024
    Copy the full SHA
    f519ca6 View commit details
  8. teams: smoother new api (fixes #4821) (#4822)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    Okuro3499 and dogi authored Dec 2, 2024
    Copy the full SHA
    9bb5c4c View commit details

Commits on Dec 3, 2024

  1. all: bump com.android.tools.build:gradle to 8.7.3 (fixes #4835) (#4831

    )
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: dogi <dogi@users.noreply.github.com>
    dependabot[bot] and dogi authored Dec 3, 2024
    Copy the full SHA
    91390c4 View commit details
  2. all: bump dagger_hilt_version to 2.53 (fixes #4834) (#4830)

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: dogi <dogi@users.noreply.github.com>
    dependabot[bot] and dogi authored Dec 3, 2024
    Copy the full SHA
    2dcdc65 View commit details
  3. all: bump com.google.dagger:hilt-android-gradle-plugin to 2.53 (fixes

    #4836) (#4832)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: dogi <dogi@users.noreply.github.com>
    dependabot[bot] and dogi authored Dec 3, 2024
    Copy the full SHA
    e793193 View commit details
  4. all: december challenge (fixes #4811) (#4812)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    Okuro3499 and dogi authored Dec 3, 2024
    Copy the full SHA
    6e539a4 View commit details

Commits on Dec 4, 2024

  1. teams: smoother members removal (fixes #4819) (#4829)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    deeppp15 and dogi authored Dec 4, 2024
    Copy the full SHA
    a50f11c View commit details
  2. login: smoother upgrade dark mode (fixes #4838) (#4839)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    deeppp15 and dogi authored Dec 4, 2024
    Copy the full SHA
    e6516d2 View commit details
  3. sync: smoother downloads (fixes #4837) (#4840)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    Okuro3499 and dogi authored Dec 4, 2024
    Copy the full SHA
    667e525 View commit details

Commits on Dec 5, 2024

  1. surveys: smoother numbers (fixes #4833) (#4842)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    deeppp15 and dogi authored Dec 5, 2024
    Copy the full SHA
    cf00e2f View commit details

Commits on Dec 6, 2024

  1. all: smoother dialogs (fixes #4844) (#4845)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    deeppp15 and dogi authored Dec 6, 2024
    Copy the full SHA
    8e3ad02 View commit details

Commits on Dec 10, 2024

  1. all: bump dagger_hilt_version to 2.53.1 (fixes #4854) (#4849)

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: dogi <dogi@users.noreply.github.com>
    dependabot[bot] and dogi authored Dec 10, 2024
    Copy the full SHA
    f730760 View commit details
  2. all: bump com.google.dagger:hilt-android-gradle-plugin to 2.53.1 (f…

    …ixes #4855) (#4850)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: dogi <dogi@users.noreply.github.com>
    dependabot[bot] and dogi authored Dec 10, 2024
    Copy the full SHA
    5dfa28c View commit details
  3. chat: smoother sharing translations (fixes #4851) (#4852)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    Okuro3499 and dogi authored Dec 10, 2024
    Copy the full SHA
    69bc403 View commit details

Commits on Dec 11, 2024

  1. sync: smoother exceptions (fixes #4861) (#4864)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    Okuro3499 and dogi authored Dec 11, 2024
    Copy the full SHA
    5d55762 View commit details
  2. all: smoother challenge (fixes #4865) (#4866)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    Okuro3499 and dogi authored Dec 11, 2024
    Copy the full SHA
    f3b9bc2 View commit details

Commits on Dec 12, 2024

  1. all: bump camera_version to 1.4.1 (fixes #4870) (#4868)

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: dogi <dogi@users.noreply.github.com>
    dependabot[bot] and dogi authored Dec 12, 2024
    Copy the full SHA
    8a22788 View commit details

Commits on Dec 13, 2024

  1. resources: smoother list details (fixes #4860) (#4867)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    deeppp15 and dogi authored Dec 13, 2024
    Copy the full SHA
    ea6c5b7 View commit details
  2. all: smoother guests navigation (fixes #4863) (#4869)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    Avinash-Codes and dogi authored Dec 13, 2024
    Copy the full SHA
    05df614 View commit details
  3. login: smoother avatar check (fixes #4872) (#4876)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    Avinash-Codes and dogi authored Dec 13, 2024
    Copy the full SHA
    ec65ffb View commit details
  4. login: smoother earth check (fixes #4875) (#4877)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    Avinash-Codes and dogi authored Dec 13, 2024
    Copy the full SHA
    8cd3f2e View commit details
  5. login: smoother permissions check (fixes #4873) (#4878)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    Avinash-Codes and dogi authored Dec 13, 2024
    Copy the full SHA
    f3c7b30 View commit details

Commits on Dec 17, 2024

  1. login: smoother mode handling (fixes #4879) (#4882)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    Co-authored-by: Gideon Okuro <gideonollonde@gmail.com>
    3 people authored Dec 17, 2024
    Copy the full SHA
    aab286b View commit details
  2. teams: smoother list message (fixes #4887) (#4888)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    Okuro3499 and dogi authored Dec 17, 2024
    Copy the full SHA
    d23d288 View commit details

Commits on Dec 18, 2024

  1. all: smoother orientation change (fixes #4859) (#4871)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    deeppp15 and dogi authored Dec 18, 2024
    Copy the full SHA
    626dd23 View commit details

Commits on Dec 19, 2024

  1. all: smoother main navigation icons (fixes #4891) (#4892)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    Avinash-Codes and dogi authored Dec 19, 2024
    Copy the full SHA
    e98d109 View commit details
  2. all: smoother navigation community icon (fixes #4893) (#4894)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    Avinash-Codes and dogi authored Dec 19, 2024
    Copy the full SHA
    062bfef View commit details

Commits on Dec 20, 2024

  1. all: bump media3_version to 1.5.1 (fixes #4907) (#4902)

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: dogi <dogi@users.noreply.github.com>
    dependabot[bot] and dogi authored Dec 20, 2024
    Copy the full SHA
    0475249 View commit details
  2. all: smoother navigation (fixes#4886) (#4889)

    Co-authored-by: Gideon Okuro <gideonollonde@gmail.com>
    Co-authored-by: dogi <dogi@users.noreply.github.com>
    3 people authored Dec 20, 2024
    Copy the full SHA
    77ae301 View commit details
  3. all: smoother pending survey notifications (fixes #4900) (#4901)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    deeppp15 and dogi authored Dec 20, 2024
    Copy the full SHA
    29c9864 View commit details
  4. all: smoother markdown dark mode (fixes #4903) (#4904)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    Avinash-Codes and dogi authored Dec 20, 2024
    Copy the full SHA
    a0edd52 View commit details
  5. all: smoother notification navigation (fixes #4883) (#4905)

    Co-authored-by: Gideon Okuro <gideonollonde@gmail.com>
    Co-authored-by: dogi <dogi@users.noreply.github.com>
    3 people authored Dec 20, 2024
    Copy the full SHA
    1077bb9 View commit details
  6. all: smoother feedback navigation (fixes #4885) (#4906)

    Co-authored-by: Gideon Okuro <gideonollonde@gmail.com>
    Co-authored-by: dogi <dogi@users.noreply.github.com>
    3 people authored Dec 20, 2024
    Copy the full SHA
    c69eab8 View commit details

Commits on Dec 23, 2024

  1. all: bump dagger_hilt_version to 2.54 (fixes #4914) (#4908)

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: dogi <dogi@users.noreply.github.com>
    dependabot[bot] and dogi authored Dec 23, 2024
    Copy the full SHA
    d291305 View commit details
  2. all: bump com.google.dagger:hilt-android-gradle-plugin to 2.54 (fixes

    #4915) (#4909)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: dogi <dogi@users.noreply.github.com>
    dependabot[bot] and dogi authored Dec 23, 2024
    Copy the full SHA
    9299206 View commit details
  3. all: less strings is more (fixes #4898) (#4899)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    deeppp15 and dogi authored Dec 23, 2024
    Copy the full SHA
    73079f2 View commit details
  4. courses: smoother markdown dark mode (fixes #4911) (#4912)

    Co-authored-by: Gideon Okuro <gideonollonde@gmail.com>
    Co-authored-by: dogi <dogi@users.noreply.github.com>
    3 people authored Dec 23, 2024
    Copy the full SHA
    ad144be View commit details

Commits on Jan 2, 2025

  1. dashboard: smoother translations (fixes #4923) (#4924)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    Avinash-Codes and dogi authored Jan 2, 2025
    Copy the full SHA
    25e981f View commit details
  2. mylife: smoother myhealth birthdate (fixes #4929) (#4930)

    Co-authored-by: Gideon Okuro <gideonollonde@gmail.com>
    Co-authored-by: dogi <dogi@users.noreply.github.com>
    3 people authored Jan 2, 2025
    Copy the full SHA
    5c388f9 View commit details
  3. resources: smoother html apps (fixes #4896) (#4897)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    Okuro3499 and dogi authored Jan 2, 2025
    Copy the full SHA
    4407ba9 View commit details

Commits on Jan 3, 2025

  1. dashboard: smoother dark mode (fixes #4937) (#4938)

    Co-authored-by: dogi <dogi@users.noreply.github.com>
    Co-authored-by: Avinash Sharma <133222313+Avinash-Codes@users.noreply.github.com>
    3 people authored Jan 3, 2025
    Copy the full SHA
    a4cd17d View commit details
Showing with 1,253 additions and 620 deletions.
  1. +6 −6 app/build.gradle
  2. BIN app/src/main/assets/images/november_challenge.jpeg
  3. +32 −11 app/src/main/java/org/ole/planet/myplanet/MainApplication.kt
  4. +52 −57 app/src/main/java/org/ole/planet/myplanet/base/BaseContainerFragment.kt
  5. +54 −59 app/src/main/java/org/ole/planet/myplanet/base/BaseContainerFragment.kt.lite
  6. +2 −1 app/src/main/java/org/ole/planet/myplanet/base/BaseRecyclerFragment.kt
  7. +34 −10 app/src/main/java/org/ole/planet/myplanet/base/BaseResourceFragment.kt
  8. +1 −3 app/src/main/java/org/ole/planet/myplanet/base/PermissionActivity.kt
  9. +1 −3 app/src/main/java/org/ole/planet/myplanet/base/PermissionActivity.kt.lite
  10. +6 −1 app/src/main/java/org/ole/planet/myplanet/datamanager/MyDownloadService.kt
  11. +0 −2 app/src/main/java/org/ole/planet/myplanet/datamanager/Service.kt
  12. +34 −2 app/src/main/java/org/ole/planet/myplanet/model/RealmMyLibrary.kt
  13. +20 −7 app/src/main/java/org/ole/planet/myplanet/model/RealmSubmission.kt
  14. +50 −27 app/src/main/java/org/ole/planet/myplanet/ui/SettingActivity.kt
  15. +0 −3 app/src/main/java/org/ole/planet/myplanet/ui/chat/ChatDetailFragment.kt
  16. +13 −13 app/src/main/java/org/ole/planet/myplanet/ui/chat/ChatHistoryListAdapter.kt
  17. +2 −2 app/src/main/java/org/ole/planet/myplanet/ui/courses/AdapterCourses.kt
  18. +22 −0 app/src/main/java/org/ole/planet/myplanet/ui/courses/MyProgressFragment.kt
  19. +29 −31 app/src/main/java/org/ole/planet/myplanet/ui/courses/TakeCourseFragment.kt
  20. +1 −1 app/src/main/java/org/ole/planet/myplanet/ui/dashboard/BaseDashboardFragment.kt
  21. +3 −3 app/src/main/java/org/ole/planet/myplanet/ui/dashboard/BaseDashboardFragmentPlugin.kt
  22. +67 −47 app/src/main/java/org/ole/planet/myplanet/ui/dashboard/DashboardActivity.kt
  23. +67 −47 app/src/main/java/org/ole/planet/myplanet/ui/dashboard/DashboardActivity.kt.lite
  24. +39 −42 app/src/main/java/org/ole/planet/myplanet/ui/enterprises/ReportsFragment.kt
  25. +1 −1 app/src/main/java/org/ole/planet/myplanet/ui/exam/TakeExamFragment.kt
  26. +16 −3 app/src/main/java/org/ole/planet/myplanet/ui/myhealth/AddMyHealthActivity.kt
  27. +27 −21 app/src/main/java/org/ole/planet/myplanet/ui/myhealth/MyHealthFragment.kt
  28. +7 −6 app/src/main/java/org/ole/planet/myplanet/ui/mylife/AdapterMyLife.kt
  29. +8 −4 app/src/main/java/org/ole/planet/myplanet/ui/news/AdapterNews.kt
  30. +4 −0 app/src/main/java/org/ole/planet/myplanet/ui/resources/AdapterResource.kt
  31. +2 −2 app/src/main/java/org/ole/planet/myplanet/ui/survey/AdapterSurvey.kt
  32. +59 −15 app/src/main/java/org/ole/planet/myplanet/ui/sync/DashboardElementActivity.kt
  33. +5 −0 app/src/main/java/org/ole/planet/myplanet/ui/sync/LoginActivity.kt
  34. +0 −21 app/src/main/java/org/ole/planet/myplanet/ui/sync/SyncActivity.kt
  35. +6 −3 app/src/main/java/org/ole/planet/myplanet/ui/team/MyTeamsDetailFragment.kt
  36. +27 −1 app/src/main/java/org/ole/planet/myplanet/ui/team/TeamDetailFragment.kt
  37. +1 −1 app/src/main/java/org/ole/planet/myplanet/ui/team/TeamFragment.kt
  38. +2 −3 app/src/main/java/org/ole/planet/myplanet/ui/team/teamDiscussion/DiscussionListFragment.kt
  39. +99 −36 app/src/main/java/org/ole/planet/myplanet/ui/team/teamMember/AdapterJoinedMember.kt
  40. +1 −1 app/src/main/java/org/ole/planet/myplanet/ui/team/teamMember/JoinedMemberFragment.kt
  41. +109 −12 app/src/main/java/org/ole/planet/myplanet/ui/viewer/WebViewActivity.kt
  42. +7 −7 app/src/main/java/org/ole/planet/myplanet/utilities/DialogUtils.kt
  43. +30 −26 app/src/main/java/org/ole/planet/myplanet/utilities/FileUtils.kt
  44. +11 −7 app/src/main/java/org/ole/planet/myplanet/utilities/MarkdownDialog.kt
  45. BIN app/src/main/res/drawable/community.png
  46. BIN app/src/main/res/drawable/december_challenge.jpeg
  47. +2 −1 app/src/main/res/drawable/ic_more.xml
  48. +1 −1 app/src/main/res/drawable/light_rect.xml
  49. BIN app/src/main/res/drawable/moon_24dp.png
  50. BIN app/src/main/res/drawable/moon_35.png
  51. BIN app/src/main/res/drawable/november_challenge.jpeg
  52. BIN app/src/main/res/drawable/sun_24dp.png
  53. BIN app/src/main/res/drawable/sun_35.png
  54. BIN app/src/main/res/drawable/white_moon_24dp.png
  55. +14 −1 app/src/main/res/layout-large-land/activity_login.xml
  56. +15 −3 app/src/main/res/layout-night/activity_login.xml
  57. +14 −1 app/src/main/res/layout-normal-land/activity_login.xml
  58. +13 −0 app/src/main/res/layout-xlarge-land/activity_login.xml
  59. +27 −9 app/src/main/res/layout/activity_add_my_health.xml
  60. +15 −3 app/src/main/res/layout/activity_login.xml
  61. +6 −11 app/src/main/res/layout/activity_markdown_viewer.xml
  62. +26 −3 app/src/main/res/layout/alert_input.xml
  63. +21 −0 app/src/main/res/layout/custom_dialog_layout.xml
  64. +1 −1 app/src/main/res/layout/dialog_campaign_challenge.xml
  65. +1 −1 app/src/main/res/layout/fragment_team_detail.xml
  66. +0 −21 app/src/main/res/layout/fragment_vital_sign.xml
  67. +2 −2 app/src/main/res/layout/item_home_my_team.xml
  68. +4 −5 app/src/main/res/layout/item_library_home.xml
  69. +4 −4 app/src/main/res/layout/item_my_life.xml
  70. +20 −0 app/src/main/res/values-ar/strings.xml
  71. +20 −0 app/src/main/res/values-es/strings.xml
  72. +20 −0 app/src/main/res/values-fr/strings.xml
  73. +20 −0 app/src/main/res/values-ne/strings.xml
  74. +3 −1 app/src/main/res/values-night/colors.xml
  75. +20 −0 app/src/main/res/values-so/strings.xml
  76. +2 −0 app/src/main/res/values/colors.xml
  77. +22 −1 app/src/main/res/values/strings.xml
  78. +3 −3 build.gradle
12 changes: 6 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -10,8 +10,8 @@ android {
applicationId "org.ole.planet.myplanet"
minSdkVersion 26
targetSdkVersion 34
versionCode 2109
versionName "0.21.9"
versionCode 2162
versionName "0.21.62"
ndkVersion '21.3.6528147'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
@@ -202,13 +202,13 @@ dependencies {
implementation 'com.mikepenz:crossfadedrawerlayout:1.1.0@aar'
implementation('com.mikepenz:materialdrawer:6.1.1@aar') { transitive = true}

def camera_version = "1.4.0"
def camera_version = "1.4.1"
implementation "androidx.camera:camera-core:$camera_version"
implementation "androidx.camera:camera-camera2:$camera_version"
implementation "androidx.camera:camera-lifecycle:$camera_version"
implementation "androidx.camera:camera-view:$camera_version"

def dagger_hilt_version = "2.52"
def dagger_hilt_version = "2.54"
implementation "com.google.dagger:hilt-android:$dagger_hilt_version"
kapt "com.google.dagger:hilt-android-compiler:$dagger_hilt_version"

@@ -220,7 +220,7 @@ dependencies {
implementation "com.github.bumptech.glide:glide:$glide_version"
kapt "com.github.bumptech.glide:compiler:$glide_version"

def media3_version = "1.4.1"
def media3_version = "1.5.1"
implementation "androidx.media3:media3-exoplayer:$media3_version"
implementation "androidx.media3:media3-ui:$media3_version"
implementation "androidx.media3:media3-common:$media3_version"
@@ -230,7 +230,7 @@ dependencies {
implementation "io.noties.markwon:image:$markwon_version"
implementation "io.noties.markwon:html:$markwon_version"
implementation "io.noties.markwon:ext-tables:$markwon_version"
implementation(platform("org.jetbrains.kotlin:kotlin-bom:2.0.21"))
implementation(platform("org.jetbrains.kotlin:kotlin-bom:2.1.0"))

implementation 'com.github.chrisbanes:PhotoView:2.3.0'
}
Binary file removed app/src/main/assets/images/november_challenge.jpeg
Binary file not shown.
43 changes: 32 additions & 11 deletions app/src/main/java/org/ole/planet/myplanet/MainApplication.kt
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ import android.app.Application
import android.content.Context
import android.content.Intent
import android.content.SharedPreferences
import android.content.res.Configuration
import android.os.Bundle
import android.os.StrictMode
import android.os.StrictMode.VmPolicy
@@ -55,7 +56,7 @@ class MainApplication : Application(), Application.ActivityLifecycleCallbacks {
private const val AUTO_SYNC_WORK_TAG = "autoSyncWork"
private const val STAY_ONLINE_WORK_TAG = "stayOnlineWork"
private const val TASK_NOTIFICATION_WORK_TAG = "taskNotificationWork"
lateinit var context: Context
lateinit var context: Context
lateinit var mRealm: Realm
lateinit var service: DatabaseService
var preferences: SharedPreferences? = null
@@ -111,17 +112,25 @@ class MainApplication : Application(), Application.ActivityLifecycleCallbacks {
}

fun setThemeMode(themeMode: String) {
val sharedPreferences = context.getSharedPreferences("app_preferences", MODE_PRIVATE)
val sharedPreferences = context.getSharedPreferences(PREFS_NAME, MODE_PRIVATE)
with(sharedPreferences.edit()) {
putString("theme_mode", themeMode)
apply()
commit()
}
applyThemeMode(themeMode)
}

suspend fun isServerReachable(urlString: String): Boolean {
return try {
val url = URL(urlString)
if (urlString.isBlank()) return false

val formattedUrl = if (!urlString.startsWith("http://") && !urlString.startsWith("https://")) {
"http://$urlString"
} else {
urlString
}

val url = URL(formattedUrl)
val connection = withContext(Dispatchers.IO) {
url.openConnection()
} as HttpURLConnection
@@ -210,10 +219,8 @@ class MainApplication : Application(), Application.ActivityLifecycleCallbacks {
registerActivityLifecycleCallbacks(this)
onAppStarted()

val sharedPreferences = getSharedPreferences("app_preferences", MODE_PRIVATE)
val themeMode = sharedPreferences.getString("theme_mode", ThemeMode.FOLLOW_SYSTEM)

applyThemeMode(themeMode)
val savedThemeMode = getCurrentThemeMode()
applyThemeMode(savedThemeMode)

isNetworkConnectedFlow.onEach { isConnected ->
if (isConnected) {
@@ -266,8 +273,17 @@ class MainApplication : Application(), Application.ActivityLifecycleCallbacks {

override fun onConfigurationChanged(newConfig: android.content.res.Configuration) {
super.onConfigurationChanged(newConfig)
LocaleHelper.onAttach(this)
val currentNightMode = newConfig.uiMode and android.content.res.Configuration.UI_MODE_NIGHT_MASK
val currentNightMode = context.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
val isSystemNight= when (currentNightMode) {
Configuration.UI_MODE_NIGHT_YES -> true
Configuration.UI_MODE_NIGHT_NO -> false
else -> false
}
val savedThemeMode = getCurrentThemeMode()
if (savedThemeMode != ThemeMode.FOLLOW_SYSTEM) {
return
}

when (currentNightMode) {
android.content.res.Configuration.UI_MODE_NIGHT_NO -> {
applyThemeMode(ThemeMode.LIGHT)
@@ -278,6 +294,11 @@ class MainApplication : Application(), Application.ActivityLifecycleCallbacks {
}
}

private fun getCurrentThemeMode(): String {
val sharedPreferences = context.getSharedPreferences(PREFS_NAME, MODE_PRIVATE)
return sharedPreferences.getString("theme_mode", ThemeMode.FOLLOW_SYSTEM) ?: ThemeMode.FOLLOW_SYSTEM
}

override fun onActivityCreated(activity: Activity, bundle: Bundle?) {}

override fun onActivityStarted(activity: Activity) {
@@ -312,7 +333,7 @@ class MainApplication : Application(), Application.ActivityLifecycleCallbacks {
}
}
}

private fun onAppBackgrounded() {}

private fun onAppStarted() {
Original file line number Diff line number Diff line change
@@ -29,8 +29,6 @@ import org.ole.planet.myplanet.base.PermissionActivity.Companion.hasInstallPermi
import org.ole.planet.myplanet.callback.OnHomeItemClickListener
import org.ole.planet.myplanet.callback.OnRatingChangeListener
import org.ole.planet.myplanet.model.RealmMyLibrary
import org.ole.planet.myplanet.model.RealmUserChallengeActions
import org.ole.planet.myplanet.model.RealmUserChallengeActions.Companion.createAction
import org.ole.planet.myplanet.service.UserProfileDbHandler
import org.ole.planet.myplanet.service.UserProfileDbHandler.Companion.KEY_RESOURCE_DOWNLOAD
import org.ole.planet.myplanet.service.UserProfileDbHandler.Companion.KEY_RESOURCE_OPEN
@@ -72,16 +70,16 @@ abstract class BaseContainerFragment : BaseResourceFragment() {
AdapterCourses.showRating(`object`, rating, timesRated, ratingBar)
}
}
fun getUrlsAndStartDownload(
lib: List<RealmMyLibrary?>, urls: ArrayList<String>
) {
fun getUrlsAndStartDownload(lib: List<RealmMyLibrary?>, urls: ArrayList<String>) {
for (library in lib) {
val url = Utilities.getUrl(library)
if (!FileUtils.checkFileExist(url) && !TextUtils.isEmpty(url)) urls.add(url)
if (!FileUtils.checkFileExist(url) && !TextUtils.isEmpty(url)) {
urls.add(url)
}
}
if (urls.isNotEmpty()) {
startDownload(urls)
}
if (urls.isNotEmpty()) startDownload(urls) else Utilities.toast(
activity, getString(R.string.no_images_to_download)
)
}
fun initRatingView(type: String?, id: String?, title: String?, listener: OnRatingChangeListener?) {
timesRated = requireView().findViewById(R.id.times_rated)
@@ -127,23 +125,53 @@ abstract class BaseContainerFragment : BaseResourceFragment() {
}

fun openResource(items: RealmMyLibrary) {
val matchingItems = mRealm.where(RealmMyLibrary::class.java)
.equalTo("resourceLocalAddress", items.resourceLocalAddress)
.findAll()
val anyOffline = matchingItems.any { it.isResourceOffline() }
if (anyOffline) {
val offlineItem = matchingItems.first { it.isResourceOffline()}
openFileType(offlineItem, "offline")
if (items.openWith == "HTML") {
if (items.resourceOffline) {
val intent = Intent(activity, WebViewActivity::class.java)
intent.putExtra("RESOURCE_ID", items.id)
intent.putExtra("LOCAL_ADDRESS", items.resourceLocalAddress)
intent.putExtra("title", items.title)
startActivity(intent)
} else {
val resource = mRealm.where(RealmMyLibrary::class.java).equalTo("_id", items.resourceId).findFirst()
val downloadUrls = ArrayList<String>()
resource?.attachments?.forEach { attachment ->
attachment.name?.let { name ->
val url = Utilities.getUrl("${items.resourceId}", name)
downloadUrls.add(url)

val baseDir = File(context?.getExternalFilesDir(null), "ole/${items.resourceId}")
val lastSlashIndex = name.lastIndexOf('/')
if (lastSlashIndex > 0) {
val dirPath = name.substring(0, lastSlashIndex)
File(baseDir, dirPath).mkdirs()
}
}
}

if (downloadUrls.isNotEmpty()) {
startDownload(downloadUrls)
}
}
} else {
if (items.isResourceOffline()) {
openFileType(items, "offline")
} else if (FileUtils.getFileExtension(items.resourceLocalAddress) == "mp4") {
openFileType(items, "online")
val matchingItems = mRealm.where(RealmMyLibrary::class.java)
.equalTo("resourceLocalAddress", items.resourceLocalAddress)
.findAll()
val anyOffline = matchingItems.any { it.isResourceOffline() }
if (anyOffline) {
val offlineItem = matchingItems.first { it.isResourceOffline() }
openFileType(offlineItem, "offline")
} else {
val arrayList = ArrayList<String>()
arrayList.add(Utilities.getUrl(items))
startDownload(arrayList)
profileDbHandler.setResourceOpenCount(items, KEY_RESOURCE_DOWNLOAD)
if (items.isResourceOffline()) {
openFileType(items, "offline")
} else if (FileUtils.getFileExtension(items.resourceLocalAddress) == "mp4") {
openFileType(items, "online")
} else {
val arrayList = ArrayList<String>()
arrayList.add(Utilities.getUrl(items))
startDownload(arrayList)
profileDbHandler.setResourceOpenCount(items, KEY_RESOURCE_DOWNLOAD)
}
}
}
}
@@ -152,65 +180,32 @@ abstract class BaseContainerFragment : BaseResourceFragment() {
val filenameArray = items.resourceLocalAddress?.split("\\.".toRegex())?.toTypedArray()
val extension = filenameArray?.get(filenameArray.size - 1)
val mimetype = Utilities.getMimeType(items.resourceLocalAddress)
val userId = "${model?.id}"

val existingAction = mRealm.where(RealmUserChallengeActions::class.java)
.equalTo("userId", userId)
.equalTo("resourceId", items.resourceId)
.findFirst()

if (mimetype != null) {
if (mimetype.contains("image")) {
openIntent(items, ImageViewerActivity::class.java)
if (existingAction == null) {
createAction(mRealm, userId, items.resourceId, "resourceOpen")
}
} else if (mimetype.contains("pdf")) {
openPdf(items)
if (existingAction == null) {
createAction(mRealm, userId, items.resourceId, "resourceOpen")
}
} else if (mimetype.contains("audio")) {
openIntent(items, AudioPlayerActivity::class.java)
if (existingAction == null) {
createAction(mRealm, userId, items.resourceId, "resourceOpen")
}
} else {
checkMoreFileExtensions(extension, items)
}
}
}

private fun checkMoreFileExtensions(extension: String?, items: RealmMyLibrary) {
val userId = "${model?.id}"
val existingAction = mRealm.where(RealmUserChallengeActions::class.java)
.equalTo("userId", userId)
.equalTo("resourceId", items.resourceId)
.findFirst()

when (extension) {
"txt" -> {
if (existingAction == null) {
createAction(mRealm, userId, items.resourceId, "resourceOpen")
}
openIntent(items, TextFileViewerActivity::class.java)
}
"md" -> {
if (existingAction == null) {
createAction(mRealm, userId, items.resourceId, "resourceOpen")
}
openIntent(items, MarkdownViewerActivity::class.java)
}
"csv" -> {
if (existingAction == null) {
createAction(mRealm, userId, items.resourceId, "resourceOpen")
}
openIntent(items, CSVViewerActivity::class.java)
}
"apk" -> {
if (existingAction == null) {
createAction(mRealm, userId, items.resourceId, "resourceOpen")
}
installApk(items)
}
else -> Toast.makeText(activity, getString(R.string.this_file_type_is_currently_unsupported), Toast.LENGTH_LONG).show()
Loading