Skip to content

Commit

Permalink
Use coil-multiplatform for remote image loading (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
findjigar authored Mar 21, 2024
1 parent 3f0fb38 commit 7b706d7
Show file tree
Hide file tree
Showing 58 changed files with 158 additions and 1,261 deletions.
2 changes: 1 addition & 1 deletion android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ dependencies {
implementation(libs.koin.core)
implementation(libs.koin.android)
implementation(libs.kotlinx.datetime)
implementation(libs.accompanist.coil)
implementation(libs.coil.compose)
implementation(libs.accompanist.navigationAnimation)
implementation(platform(libs.firebase.bom))
implementation(libs.firebase.analytics)
Expand Down
15 changes: 0 additions & 15 deletions android/src/main/res/drawable/baseline_sentiment_satisfied_24.xml

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions android/src/main/res/drawable/ic_baseline_add_24.xml

This file was deleted.

11 changes: 0 additions & 11 deletions android/src/main/res/drawable/ic_baseline_arrow_back_24.xml

This file was deleted.

10 changes: 0 additions & 10 deletions android/src/main/res/drawable/ic_baseline_calendar_today_24.xml

This file was deleted.

10 changes: 0 additions & 10 deletions android/src/main/res/drawable/ic_baseline_check_24.xml

This file was deleted.

9 changes: 0 additions & 9 deletions android/src/main/res/drawable/ic_baseline_feedback_24.xml

This file was deleted.

10 changes: 0 additions & 10 deletions android/src/main/res/drawable/ic_baseline_person_24.xml

This file was deleted.

9 changes: 0 additions & 9 deletions android/src/main/res/drawable/ic_description_black_24dp.xml

This file was deleted.

9 changes: 0 additions & 9 deletions android/src/main/res/drawable/icon_company.xml

This file was deleted.

9 changes: 0 additions & 9 deletions android/src/main/res/drawable/icon_profile.xml

This file was deleted.

9 changes: 0 additions & 9 deletions android/src/main/res/drawable/icon_website.xml

This file was deleted.

9 changes: 0 additions & 9 deletions android/src/main/res/drawable/menu_info.xml

This file was deleted.

12 changes: 0 additions & 12 deletions android/src/main/res/drawable/menu_my_agenda.xml

This file was deleted.

9 changes: 0 additions & 9 deletions android/src/main/res/drawable/menu_schedule.xml

This file was deleted.

12 changes: 0 additions & 12 deletions android/src/main/res/drawable/menu_settings.xml

This file was deleted.

9 changes: 0 additions & 9 deletions android/src/main/res/drawable/menu_sponsor.xml

This file was deleted.

37 changes: 0 additions & 37 deletions android/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,43 +7,6 @@
<string name="notification_feedback_title">Feedback Time!</string>
<string name="notification_feedback_body">Your Feedback is Requested.</string>

<string name="schedule_title">Schedule</string>
<string name="droidcon_title">Droidcon London 2023</string>
<string name="schedule_session_detail_title">Session</string>
<string name="schedule_session_detail_status_future">This session hasn\'t started yet.</string>
<string name="schedule_session_detail_status_in_progress">This session is happening now.</string>
<string name="schedule_session_detail_status_past">This session has already ended.</string>
<string name="schedule_session_detail_status_conflict">This session conflicts with another session in your schedule.</string>
<string name="schedule_session_detail_is_attending_action_description">Do not attend</string>
<string name="schedule_session_detail_is_not_attending_action_description">Attend</string>
<string name="schedule_session_detail_info_description">Info</string>
<string name="schedule_session_detail_description_description">Description</string>
<string name="schedule_speaker_detail_title">Speaker</string>
<string name="schedule_speaker_detail_info_description">Info</string>
<string name="schedule_empty">There are no sessions planned.</string>
<string name="schedule_item_in_room">in %s</string>

<string name="my_agenda_title">My Agenda</string>
<string name="my_agenda_empty">You are not attending any sessions.</string>

<string name="sponsors_title">Sponsors</string>
<string name="sponsors_empty">Sponsors could not be loaded.</string>
<string name="sponsor_title">Sponsor</string>
<string name="sponsor_detail_description_description">Description</string>

<string name="settings_title">Settings</string>
<string name="settings_enable_feedback_title">Enable feedback</string>
<string name="settings_enable_reminders_title">Enable reminders</string>

<string name="feedback_title">What did you think of \"%s\"?</string>
<string name="feedback_opinion_placeholder">(Optional) Suggest improvements</string>
<string name="feedback_reaction_bad_description">Bad</string>
<string name="feedback_reaction_normal_description">Normal</string>
<string name="feedback_reaction_good_description">Good</string>
<string name="feedback_submit">Submit</string>
<string name="feedback_close_and_disable">Close and disable feedback</string>
<string name="feedback_skip">Skip feedback</string>

<string name="feedback_add_title">Add feedback</string>
<string name="feedback_change_title">Change your feedback</string>
</resources>
5 changes: 3 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ compose-compiler = "1.5.11-dev-k2.0.0-Beta4-21f5e479a96"
composeNavigation = "2.7.7"
compose-jb = "1.6.1"

accompanistCoil = "0.15.0"
accompanistNavigationAnimation = "0.34.0"
splashscreen = "1.0.1"
junit = "4.13.2"
Expand All @@ -45,13 +44,15 @@ android-desugaring = "2.0.4"
koin = "3.5.3"
uuid = "0.8.3"
ktlint = "11.0.0"
coil = "3.0.0-alpha04"

[libraries]
coil-compose = { module = "io.coil-kt.coil3:coil-compose", version.ref = "coil" }
coil-network = { module = "io.coil-kt.coil3:coil-network-ktor", version.ref = "coil" }
sqliter = { module = "co.touchlab:sqliter-driver", version.ref = "sqliter" }
compose-compiler = { module = "androidx.compose.compiler:compiler", version.ref = "compose-compiler" }
androidx-core-splashscreen = { module = "androidx.core:core-splashscreen", version.ref = "splashscreen" }

accompanist-coil = { module = "com.google.accompanist:accompanist-coil", version.ref = "accompanistCoil" }
accompanist-navigationAnimation = { module = "com.google.accompanist:accompanist-navigation-animation", version.ref = "accompanistNavigationAnimation" }
firebase-bom = { module = "com.google.firebase:firebase-bom", version.ref = "firebase-bom" }
firebase-analytics = { module = "com.google.firebase:firebase-analytics-ktx", version = "_" }
Expand Down
5 changes: 2 additions & 3 deletions shared-ui/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ kotlin {
api(libs.kotlinx.datetime)
api(libs.multiplatformSettings.core)
api(libs.uuid)
implementation(libs.coil.compose)
implementation(libs.coil.network)

implementation(libs.bundles.ktor.common)
implementation(libs.bundles.sqldelight.common)
Expand All @@ -97,9 +99,6 @@ kotlin {
implementation(libs.hyperdrive.multiplatformx.api)
// implementation(libs.hyperdrive.multiplatformx.compose)
}
androidMain.dependencies {
implementation(libs.accompanist.coil)
}
iosMain.dependencies {
implementation(libs.imageLoader)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Warning
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
Expand All @@ -17,7 +18,6 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.painterResource
import co.touchlab.droidcon.ui.icons.Warning
import co.touchlab.droidcon.ui.theme.Dimensions

// Use of the function getIdentifier is discouraged, but we need to use it since the drawable names are defined in the common code for both
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ package co.touchlab.droidcon.ui
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.padding
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.CalendarMonth
import androidx.compose.material.icons.filled.LocalFireDepartment
import androidx.compose.material.icons.filled.Schedule
import androidx.compose.material.icons.filled.Settings
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.NavigationBar
Expand All @@ -13,10 +17,6 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
import co.touchlab.droidcon.ui.icons.CalendarMonth
import co.touchlab.droidcon.ui.icons.LocalFireDepartment
import co.touchlab.droidcon.ui.icons.Schedule
import co.touchlab.droidcon.ui.icons.Settings
import co.touchlab.droidcon.ui.session.SessionListView
import co.touchlab.droidcon.ui.settings.SettingsView
import co.touchlab.droidcon.ui.sponsors.SponsorsView
Expand Down
Loading

0 comments on commit 7b706d7

Please sign in to comment.