Compare commits
2 Commits
1056dc39bf
...
7bdcb7e3fb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7bdcb7e3fb | ||
|
|
d36cadeb18 |
@@ -239,7 +239,7 @@ fun StundenplanContent(activity: ComponentActivity, loadedLessons: List<List<Les
|
||||
text = {
|
||||
Text(
|
||||
text = "Die Breite der Spalten ist auf eine bestimmte Größe festgelegt.\n\n" +
|
||||
"Zu lange eingaben können horizontal gescrollt werden.",
|
||||
"Zu lange Eingaben können horizontal gescrollt werden.",
|
||||
color = MaterialTheme.colorScheme.onPrimaryContainer,
|
||||
style = MaterialTheme.typography.labelMedium)
|
||||
},
|
||||
|
||||
@@ -189,9 +189,18 @@ fun TimeTableSetupContent(activity: ComponentActivity, loadedLessons: List<Lesso
|
||||
IconButton(
|
||||
onClick = {
|
||||
activity.finish()
|
||||
val intent = Intent(activity, StundenplanActivity::class.java)
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
||||
startActivity(activity, intent, null)
|
||||
if (setupDone) {
|
||||
val intent = Intent(activity, StundenplanActivity::class.java)
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
||||
startActivity(activity, intent, null)
|
||||
}
|
||||
else {
|
||||
val intent = Intent(activity, MainActivity::class.java)
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK)
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
||||
startActivity(activity, intent, null)
|
||||
}
|
||||
}
|
||||
) {
|
||||
Icon(
|
||||
@@ -383,11 +392,20 @@ fun TimeTableSetupContent(activity: ComponentActivity, loadedLessons: List<Lesso
|
||||
editor.putInt("breakAmnt", breakAmnt.toInt())
|
||||
editor.apply()
|
||||
activity.finish()
|
||||
//Reopen of activity so values will be updated
|
||||
val intent = Intent(activity, StundenplanActivity::class.java)
|
||||
//Remove previous StundenplanActivity from activity stack so when going back later it won't exist twice
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
||||
startActivity(activity, intent, null)
|
||||
if (setupDone) {
|
||||
//Reopen of activity so values will be updated
|
||||
val intent = Intent(activity, StundenplanActivity::class.java)
|
||||
//Remove previous StundenplanActivity from activity stack so when going back later it won't exist twice
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
||||
startActivity(activity, intent, null)
|
||||
}
|
||||
else {
|
||||
val intent = Intent(activity, MainActivity::class.java)
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK)
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
||||
startActivity(activity, intent, null)
|
||||
}
|
||||
},
|
||||
modifier = Modifier
|
||||
.padding(5.dp)
|
||||
|
||||
Reference in New Issue
Block a user