Skip to content

Commit

Permalink
Merge pull request #524 from code-payments/chore/components-package
Browse files Browse the repository at this point in the history
chore: create beginning of :common:components package
  • Loading branch information
bmc08gt authored Aug 22, 2024
2 parents 36525b4 + 51e1324 commit 1637f3d
Show file tree
Hide file tree
Showing 67 changed files with 205 additions and 235 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class IntentDepositTest {

// Ensure the funds have been moved out of the
// primary accounts and into the tray slots
Assert.assertEquals(0.0, resultTray.owner.partialBalance.toKinValueDouble(), 0.0)
assertEquals(0.0, resultTray.owner.partialBalance.toKinValueDouble(), 0.0)

assertEquals(1_000_000.0, resultTray.availableBalance.toKinValueDouble(), 0.0)

Expand Down
4 changes: 0 additions & 4 deletions api/src/main/java/com/getcode/model/chat/ChatMessage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package com.getcode.model.chat
import com.getcode.ed25519.Ed25519.KeyPair
import com.getcode.model.Cursor
import com.getcode.model.ID
import com.getcode.model.MessageStatus
import com.getcode.utils.serializer.UUIDSerializer
import kotlinx.serialization.Serializable
import java.util.UUID
Expand All @@ -18,7 +17,6 @@ import java.util.UUID
* @param cursor Cursor value for this message for reference in a paged GetMessagesRequest
* @param dateMillis Timestamp this message was generated at
* @param contents Ordered message content. A message may have more than one piece of content.
* @param status Derived [MessageStatus] from [Pointer]'s in [ChatMember].
*/
@Serializable
data class ChatMessage(
Expand All @@ -29,7 +27,6 @@ data class ChatMessage(
val cursor: Cursor,
val dateMillis: Long,
val contents: List<MessageContent>,
// val status: MessageStatus,
) {
val hasEncryptedContent: Boolean
get() {
Expand All @@ -40,7 +37,6 @@ data class ChatMessage(
return ChatMessage(
id = id,
senderId = senderId,
// status = status,
isFromSelf = isFromSelf,
dateMillis = dateMillis,
cursor = cursor,
Expand Down
1 change: 1 addition & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ dependencies {
implementation(project(":api"))
implementation(project(":crypto:ed25519"))
implementation(project(":crypto:kin"))
implementation(project(":common:components"))
implementation(project(":common:resources"))
implementation(project(":common:theme"))
implementation(project(":vendor:tipkit:tipkit-m2"))
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/com/getcode/CodeApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ import com.getcode.navigation.transitions.SheetSlideTransition
import com.getcode.theme.CodeTheme
import com.getcode.theme.LocalCodeColors
import com.getcode.ui.components.AuthCheck
import com.getcode.ui.components.BottomBarContainer
import com.getcode.ui.components.bars.BottomBarContainer
import com.getcode.ui.components.CodeScaffold
import com.getcode.ui.components.OnLifecycleEvent
import com.getcode.ui.components.TitleBar
import com.getcode.ui.components.TopBarContainer
import com.getcode.ui.components.bars.TopBarContainer
import com.getcode.ui.utils.getActivity
import com.getcode.ui.utils.getActivityScopedViewModel
import com.getcode.ui.utils.measured
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/getcode/domain/CashLinkManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class CashLinkManager @Inject constructor(
fun awaitBillGrab(
amount: KinAmount,
organizer: Organizer,
owner: Ed25519.KeyPair,
owner: KeyPair,
present: (List<Byte>) -> Unit,
onGrabbed: () -> Unit,
onTimeout: () -> Unit,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@ package com.getcode.navigation.screens
import android.webkit.JavascriptInterface
import androidx.activity.compose.BackHandler
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.imePadding
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.stringResource
import cafe.adriel.voyager.core.screen.ScreenKey
Expand All @@ -17,11 +13,9 @@ import cafe.adriel.voyager.hilt.getViewModel
import com.getcode.R
import com.getcode.navigation.core.LocalCodeNavigator
import com.getcode.theme.CodeTheme
import com.getcode.ui.components.CodeCircularProgressIndicator
import com.getcode.ui.components.SheetTitleDefaults
import com.getcode.ui.utils.getActivityScopedViewModel
import com.getcode.ui.utils.getStackScopedViewModel
import com.getcode.ui.utils.toAGColor
import com.getcode.view.login.PhoneConfirm
import com.getcode.view.login.PhoneVerify
import com.getcode.view.login.PhoneVerifyViewModel
Expand All @@ -46,8 +40,6 @@ import com.getcode.view.main.tip.ConnectAccountScreen
import com.getcode.view.main.tip.EnterTipScreen
import com.getcode.view.main.tip.IdentityConnectionReason
import com.getcode.view.main.tip.TipConnectViewModel
import com.kevinnzou.web.LoadingState
import com.kevinnzou.web.WebView
import com.kevinnzou.web.rememberWebViewNavigator
import com.kevinnzou.web.rememberWebViewState
import kotlinx.parcelize.IgnoredOnParcel
Expand Down
5 changes: 0 additions & 5 deletions app/src/main/java/com/getcode/navigation/screens/Modals.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@ import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.BoxScope
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ColumnScope
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.navigationBars
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.statusBarsPadding
import androidx.compose.foundation.layout.windowInsetsPadding
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
Expand All @@ -21,7 +18,6 @@ import androidx.compose.runtime.derivedStateOf
import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalSoftwareKeyboardController
Expand All @@ -36,7 +32,6 @@ import com.getcode.ui.components.SheetTitle
import com.getcode.ui.components.SheetTitleDefaults
import com.getcode.ui.components.SheetTitleText
import com.getcode.ui.components.keyboardAsState
import com.getcode.ui.utils.addIf
import com.getcode.ui.utils.getActivityScopedViewModel
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import androidx.compose.ui.draw.clip
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import com.getcode.theme.BrandLight
import com.getcode.theme.CodeTheme
import com.getcode.theme.White05
import com.getcode.util.PhoneUtils
Expand Down
4 changes: 0 additions & 4 deletions app/src/main/java/com/getcode/ui/components/Badge.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,14 @@ import androidx.compose.animation.fadeOut
import androidx.compose.animation.scaleIn
import androidx.compose.animation.scaleOut
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.drawBehind
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import com.getcode.theme.CodeTheme
import com.getcode.ui.components.chat.ChatNodeDefaults
import com.getcode.ui.utils.circleBackground


@Composable
Expand Down
96 changes: 0 additions & 96 deletions app/src/main/java/com/getcode/ui/components/BottomBarContainer.kt

This file was deleted.

1 change: 0 additions & 1 deletion app/src/main/java/com/getcode/ui/components/OtpBox.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.font.FontWeight
import com.getcode.theme.BrandLight
import com.getcode.theme.CodeTheme
import com.getcode.theme.WindowSizeClass
Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/com/getcode/ui/components/SettingsRow.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.layout.wrapContentSize
import androidx.compose.material.ContentAlpha
import androidx.compose.material.LocalContentColor
import androidx.compose.material.Text
Expand Down
4 changes: 0 additions & 4 deletions app/src/main/java/com/getcode/ui/components/SheetTitle.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import androidx.compose.foundation.layout.*
import androidx.compose.material.*
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.outlined.ArrowBack
import androidx.compose.material.icons.outlined.ArrowBack
import androidx.compose.material.icons.outlined.Close
import androidx.compose.material.icons.outlined.Refresh
import androidx.compose.runtime.Composable
Expand All @@ -16,11 +15,8 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import com.getcode.R
import com.getcode.theme.Brand
import com.getcode.theme.CodeTheme
import com.getcode.theme.topBarHeight
import com.getcode.ui.utils.rememberedClickable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.IntOffset
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.times
import androidx.compose.ui.util.lerp
import com.getcode.R
import com.getcode.theme.CodeTheme
import com.getcode.theme.White50
Expand Down
Loading

0 comments on commit 1637f3d

Please sign in to comment.