Skip to content

Commit

Permalink
migration fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tiebe committed Jan 30, 2024
1 parent dbf08f3 commit 46c9e4f
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package nl.tiebe.otarium.logic.root

import com.arkivanov.decompose.value.Value
import kotlinx.serialization.Serializable
import nl.tiebe.otarium.logic.root.home.HomeComponent
import nl.tiebe.otarium.logic.root.login.LoginComponent
import nl.tiebe.otarium.logic.root.onboarding.OnboardingComponent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ interface AveragesComponent : HomeComponent.MenuItemComponent, BackHandlerOwner

@Serializable
sealed class Config {
object List : Config()
@Serializable
data object List : Config()

@Serializable
data class Subject(val subjectId: Int) : Config()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ import nl.tiebe.otarium.logic.root.home.children.elo.children.learningresources.
import nl.tiebe.otarium.logic.root.home.children.elo.children.studyguides.StudyGuidesChildComponent

interface ELOComponent : HomeComponent.MenuItemComponent {
@Serializable
sealed class ELOChild(val id: Int) {
object StudyGuides : ELOChild(0)
object Assignments : ELOChild(1)
object LearningResources : ELOChild(2)
data object StudyGuides : ELOChild(0)
data object Assignments : ELOChild(1)
data object LearningResources : ELOChild(2)

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ interface AssignmentsChildComponent : ELOComponent.ELOChildComponent {

@Serializable
sealed class Config {
object AssignmentList : Config()

@Serializable
data object AssignmentList : Config()
@Serializable
data class Assignment(val assignmentLink: String) : Config()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ interface StudyGuidesChildComponent : ELOComponent.ELOChildComponent {

@Serializable
sealed class Config {
object StudyGuideList : Config()
@Serializable
data object StudyGuideList : Config()

@Serializable
data class StudyGuide(val studyGuideLink: String) : Config()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,13 @@ interface MessagesComponent: HomeComponent.MenuItemComponent, BackHandlerOwner {

@Serializable
sealed class Config {
@Serializable
data class Folder(val folderId: Int) : Config()

@Serializable
data class Message(val messageLink: String) : Config()

@Serializable
data class ReceiverInfo(val messageLink: String, val receiverType: ReceiverInfoComponent.ReceiverType) : Config()

@Serializable
data class Compose(val receivers: List<String>, val subject: String, val body: String) : Config()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,14 @@ interface SettingsComponent: HomeComponent.MenuItemComponent, BackHandlerOwner {

@Serializable
sealed class Config(val localizedString: String) {
object Main : Config(getLocalizedString(MR.strings.settingsItem))
@Serializable
data object Main : Config(getLocalizedString(MR.strings.settingsItem))

object UI : Config(getLocalizedString(MR.strings.ui_settings))
@Serializable
data object UI : Config(getLocalizedString(MR.strings.ui_settings))

object Colors : Config(getLocalizedString(MR.strings.color_settings))
@Serializable
data object Colors : Config(getLocalizedString(MR.strings.color_settings))
}

fun selectAccount(account: MagisterAccount)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ interface TimetableRootComponent : HomeComponent.MenuItemComponent, BackHandlerO

@Serializable
sealed class Config {
object Main : Config()

@Serializable
data object Main : Config()
@Serializable
data class TimetablePopup(val item: AgendaItemWithAbsence) : Config()
}

Expand Down

0 comments on commit 46c9e4f

Please sign in to comment.