-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[EPMEDU-1998]: Reduce size of downloaded images (#266)
* [EPMEDU-1998]: Reduce size of downloaded images - Prevent image duplication in cache by using disk cache keys - Move StorageApi to a separate module networkstorage - Create NetworkFile wrapper * Fix CI * Fix build * Rename get functions --------- Co-authored-by: Uladzislau Balatayeu <[email protected]>
- Loading branch information
Showing
37 changed files
with
197 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
...in/java/com/epmedu/animeal/tabs/more/donate/data/mapper/BankAccountToDonateInformation.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
package com.epmedu.animeal.tabs.more.donate.data.mapper | ||
|
||
import com.amplifyframework.datastore.generated.model.BankAccount | ||
import com.epmedu.animeal.networkstorage.domain.NetworkFile | ||
import com.epmedu.animeal.tabs.more.donate.domain.DonateInformation | ||
|
||
internal fun BankAccount.toDomain( | ||
iconUrl: String | ||
icon: NetworkFile | ||
) = DonateInformation( | ||
title = name, | ||
paymentCredentials = value, | ||
iconUrl = iconUrl | ||
icon = icon | ||
) |
2 changes: 1 addition & 1 deletion
2
...flow/moreflow/donate/src/main/java/com/epmedu/animeal/tabs/more/donate/di/DonateModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
...flow/donate/src/main/java/com/epmedu/animeal/tabs/more/donate/domain/DonateInformation.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
package com.epmedu.animeal.tabs.more.donate.domain | ||
|
||
import com.epmedu.animeal.networkstorage.domain.NetworkFile | ||
|
||
data class DonateInformation( | ||
val title: String, | ||
val paymentCredentials: String, | ||
val iconUrl: String, | ||
val icon: NetworkFile?, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,13 +6,13 @@ import kotlinx.collections.immutable.persistentListOf | |
internal val tbcBankInformation = DonateInformation( | ||
title = "TBC Bank", | ||
paymentCredentials = "2GE82983752093855555", | ||
iconUrl = "", | ||
icon = null, | ||
) | ||
|
||
internal val payPalInformation = DonateInformation( | ||
title = "PayPal", | ||
paymentCredentials = "[email protected]", | ||
iconUrl = "", | ||
icon = null, | ||
) | ||
|
||
internal val donateInformationStubList = persistentListOf( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...re/camera/src/main/java/com/epmedu/animeal/camera/data/repository/CameraRepositoryImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
shared/feature/camera/src/main/java/com/epmedu/animeal/camera/di/CameraModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 9 additions & 5 deletions
14
...feeding/src/main/java/com/epmedu/animeal/feeding/data/mapper/DataToDomainFeedingMapper.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
package com.epmedu.animeal.feeding.data.mapper | ||
|
||
import com.amplifyframework.datastore.generated.model.FeedingPoint | ||
import com.epmedu.animeal.networkstorage.domain.NetworkFile | ||
import com.amplifyframework.datastore.generated.model.Feeding as DataFeeding | ||
import com.epmedu.animeal.feeding.domain.model.UserFeeding as DomainFeeding | ||
|
||
fun DataFeeding.toDomain(isFavourite: Boolean, feedingPoint: FeedingPoint) = | ||
DomainFeeding( | ||
feedingPoint = feedingPoint.toDomainFeedingPoint(isFavourite), | ||
createdAt = createdAt.toDate() | ||
) | ||
suspend fun DataFeeding.toDomain( | ||
getImageFromName: suspend (String) -> NetworkFile, | ||
isFavourite: Boolean, | ||
feedingPoint: FeedingPoint | ||
) = DomainFeeding( | ||
feedingPoint = feedingPoint.toDomainFeedingPoint(getImageFromName, isFavourite), | ||
createdAt = createdAt.toDate() | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 0 additions & 28 deletions
28
...rc/main/java/com/epmedu/animeal/feeding/data/mapper/OnCreateFeedingPointToDomainMapper.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.