mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 13:57:10 +09:00
DROID-1337 Auth | Enhancement | Remove invite code screen (#40)
This commit is contained in:
parent
5958908b9a
commit
fc9a4dd1c1
5 changed files with 18 additions and 5 deletions
|
@ -9,6 +9,7 @@ import androidx.compose.material.MaterialTheme
|
|||
import androidx.compose.ui.platform.ComposeView
|
||||
import androidx.compose.ui.platform.ViewCompositionStrategy
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.core.os.bundleOf
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.navigation.fragment.findNavController
|
||||
import com.anytypeio.anytype.R
|
||||
|
@ -18,6 +19,7 @@ import com.anytypeio.anytype.analytics.base.sendEvent
|
|||
import com.anytypeio.anytype.core_ui.foundation.Announcement
|
||||
import com.anytypeio.anytype.core_utils.ui.BaseComposeFragment
|
||||
import com.anytypeio.anytype.di.common.componentManager
|
||||
import com.anytypeio.anytype.ui.auth.account.CreateAccountFragment
|
||||
import com.anytypeio.anytype.ui.settings.typography
|
||||
import javax.inject.Inject
|
||||
|
||||
|
@ -28,7 +30,12 @@ class AboutAnalyticsFragment : BaseComposeFragment() {
|
|||
lateinit var analytics: Analytics
|
||||
|
||||
private val onNextClicked = {
|
||||
findNavController().navigate(R.id.openInviteCodeScreen)
|
||||
findNavController().navigate(
|
||||
R.id.createAccountScreen,
|
||||
bundleOf(
|
||||
CreateAccountFragment.ARGS_CODE to EMPTY_INVITE_CODE
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private val onBackClicked : () -> Unit = {
|
||||
|
@ -69,4 +76,8 @@ class AboutAnalyticsFragment : BaseComposeFragment() {
|
|||
override fun releaseDependencies() {
|
||||
componentManager().authComponent.release()
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val EMPTY_INVITE_CODE = ""
|
||||
}
|
||||
}
|
|
@ -24,9 +24,8 @@ import com.anytypeio.anytype.presentation.navigation.AppNavigation
|
|||
import com.anytypeio.anytype.ui.base.NavigationFragment
|
||||
import javax.inject.Inject
|
||||
|
||||
|
||||
class InvitationFragment :
|
||||
NavigationFragment<FragmentInvitationBinding>(R.layout.fragment_invitation) {
|
||||
@Deprecated("To be deleted")
|
||||
class InvitationFragment : NavigationFragment<FragmentInvitationBinding>(R.layout.fragment_invitation) {
|
||||
|
||||
@Inject
|
||||
lateinit var analytics: Analytics
|
||||
|
|
|
@ -163,7 +163,6 @@ fun Warning(
|
|||
)
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.height(68.dp)
|
||||
.padding(
|
||||
top = 10.dp,
|
||||
start = 20.dp,
|
||||
|
@ -190,6 +189,7 @@ fun Warning(
|
|||
.weight(1f)
|
||||
)
|
||||
}
|
||||
Spacer(modifier = Modifier.height(10.dp))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ open class CreateAccount(
|
|||
* @property avatarPath optional avatar image file path
|
||||
* @property name username
|
||||
* @property iconGradientValue random icon gradient value for new account/space background
|
||||
* @property invitationCode optional invite code
|
||||
*/
|
||||
class Params(
|
||||
val name: String,
|
||||
|
|
|
@ -11,6 +11,7 @@ interface AppNavigation {
|
|||
fun enterKeychain()
|
||||
fun choosePinCode()
|
||||
fun confirmPinCode(pin: String)
|
||||
@Deprecated("To be deleted")
|
||||
fun enterInvitationCode()
|
||||
fun aboutAnalyticsScreen()
|
||||
fun setupNewAccount()
|
||||
|
@ -70,6 +71,7 @@ interface AppNavigation {
|
|||
object OpenStartLoginScreen : Command()
|
||||
data class OpenCreateAccount(val invitationCode: String) : Command()
|
||||
object ChoosePinCodeScreen : Command()
|
||||
@Deprecated("To be deleted")
|
||||
object InvitationCodeScreen : Command()
|
||||
object AboutAnalyticsScreen : Command()
|
||||
object ExitToInvitationCodeScreen : Command()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue