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(
|
Text(
|
||||||
text = "Die Breite der Spalten ist auf eine bestimmte Größe festgelegt.\n\n" +
|
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,
|
color = MaterialTheme.colorScheme.onPrimaryContainer,
|
||||||
style = MaterialTheme.typography.labelMedium)
|
style = MaterialTheme.typography.labelMedium)
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -189,9 +189,18 @@ fun TimeTableSetupContent(activity: ComponentActivity, loadedLessons: List<Lesso
|
|||||||
IconButton(
|
IconButton(
|
||||||
onClick = {
|
onClick = {
|
||||||
activity.finish()
|
activity.finish()
|
||||||
val intent = Intent(activity, StundenplanActivity::class.java)
|
if (setupDone) {
|
||||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
val intent = Intent(activity, StundenplanActivity::class.java)
|
||||||
startActivity(activity, intent, null)
|
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(
|
Icon(
|
||||||
@@ -383,11 +392,20 @@ fun TimeTableSetupContent(activity: ComponentActivity, loadedLessons: List<Lesso
|
|||||||
editor.putInt("breakAmnt", breakAmnt.toInt())
|
editor.putInt("breakAmnt", breakAmnt.toInt())
|
||||||
editor.apply()
|
editor.apply()
|
||||||
activity.finish()
|
activity.finish()
|
||||||
//Reopen of activity so values will be updated
|
if (setupDone) {
|
||||||
val intent = Intent(activity, StundenplanActivity::class.java)
|
//Reopen of activity so values will be updated
|
||||||
//Remove previous StundenplanActivity from activity stack so when going back later it won't exist twice
|
val intent = Intent(activity, StundenplanActivity::class.java)
|
||||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
//Remove previous StundenplanActivity from activity stack so when going back later it won't exist twice
|
||||||
startActivity(activity, intent, null)
|
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
|
modifier = Modifier
|
||||||
.padding(5.dp)
|
.padding(5.dp)
|
||||||
|
|||||||
Reference in New Issue
Block a user