-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Added cart sharing with LZ4 compression and MessagePack seriali…
…zation, improved empty state, and updated dependencies - Implemented cart sharing functionality using LZ4 compression and MessagePack serialization. - Refactored `HomeRepositoryImplementation` to handle the new cart sharing format: - Added `decodeBase62` to decode Base62-encoded data. - Added `decompressLZ4` to decompress LZ4-compressed data. - Added `deserializeMessagePack` to deserialize MessagePack-serialized data. - Updated `importSharedCartImplementation` to use the new decoding and deserialization methods. - Refactored `CartRepositoryImplementation` to use the new cart sharing format: - Added `serializeToMessagePack` to serialize cart and item data to MessagePack. - Added `compressLZ4` to compress data using LZ4. - Added `encodeBase62` to encode compressed data to Base62. - Updated `generateCartShareLinkImplementation` to use the new serialization, compression, and encoding methods. - Added a new `NoCartsScreen` composable to display a message and ad when no carts are available. - Updated the home screen to use the new `NoCartsScreen` when no carts are available. - Updated `CartItem` to format prices using the default locale. - Updated dependencies versions in `libs.versions.toml` and `build.gradle.kts`. - Added `msgpack-core` and `lz4-java` dependencies. - Updated the application's version code to 86.
- Loading branch information
Mihai-Cristian Condrea
committed
Feb 25, 2025
1 parent
336847d
commit e24ef68
Showing
7 changed files
with
273 additions
and
53 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
26 changes: 26 additions & 0 deletions
26
app/src/main/kotlin/com/d4rk/cartcalculator/ui/components/layouts/NoCartsScreen.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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.d4rk.cartcalculator.ui.components.layouts | ||
|
||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.height | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.res.stringResource | ||
import androidx.compose.ui.unit.dp | ||
import com.d4rk.android.libs.apptoolkit.ui.components.spacers.LargeVerticalSpacer | ||
import com.d4rk.cartcalculator.R | ||
import com.d4rk.cartcalculator.ui.components.ads.AdBanner | ||
import com.google.android.gms.ads.AdSize | ||
|
||
@Composable | ||
fun NoCartsScreen() { | ||
Text( | ||
text = stringResource(id = R.string.no_carts_available) | ||
) | ||
LargeVerticalSpacer() | ||
AdBanner( | ||
modifier = Modifier | ||
.fillMaxWidth() | ||
.height(AdSize.MEDIUM_RECTANGLE.height.dp) , adSize = AdSize.MEDIUM_RECTANGLE | ||
) | ||
} |
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
Oops, something went wrong.