Skip to content

Commit 64cf4a2

Browse files
committed
Fix: Correct repository links in settings screen
1 parent e1f4221 commit 64cf4a2

File tree

2 files changed

+10
-45
lines changed

2 files changed

+10
-45
lines changed

app/src/main/java/com/cleansweep/ui/screens/settings/SettingsScreen.kt

Lines changed: 9 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -670,27 +670,20 @@ fun SettingsScreen(
670670
onClick = { showAboutSortMediaDialog = true }
671671
)
672672
},
673-
SettingContent(keywords = listOf("gitlab", "source code")) {
673+
SettingContent(keywords = listOf("github", "source code")) {
674674
val uriHandler = LocalUriHandler.current
675675
SettingsItem(
676-
title = "GitLab",
677-
summary = "gitlab.com/LoopOtto/CleanSweep",
678-
onClick = { uriHandler.openUri("https://gitlab.com/LoopOtto/cleansweep") }
676+
title = "GitHub",
677+
summary = "github.com/LoopOtto/CleanSweep",
678+
onClick = { uriHandler.openUri("https://github.com/LoopOtto/CleanSweep") }
679679
)
680680
},
681-
SettingContent(keywords = listOf("github", "suspension", "source code")) {
681+
SettingContent(keywords = listOf("gitlab", "source code", "mirror")) {
682+
val uriHandler = LocalUriHandler.current
682683
SettingsItem(
683-
title = buildAnnotatedString {
684-
withStyle(style = SpanStyle(textDecoration = TextDecoration.LineThrough)) {
685-
append("GitHub")
686-
}
687-
},
688-
summary = buildAnnotatedString {
689-
withStyle(style = SpanStyle(textDecoration = TextDecoration.LineThrough)) {
690-
append("github.com/LoopOtto/CleanSweep")
691-
}
692-
},
693-
onClick = viewModel::showGitHubSuspensionDialog
684+
title = "GitLab",
685+
summary = "gitlab.com/LoopOtto/CleanSweep (read-only mirror)",
686+
onClick = { uriHandler.openUri("https://gitlab.com/LoopOtto/cleansweep") }
694687
)
695688
},
696689
SettingContent(keywords = listOf("open-source licenses", "libraries")) {
@@ -787,10 +780,6 @@ fun SettingsScreen(
787780
)
788781
}
789782

790-
if (uiState.showGitHubSuspensionDialog) {
791-
GitHubSuspensionDialog(onDismiss = viewModel::dismissGitHubSuspensionDialog)
792-
}
793-
794783
if (uiState.showDuplicateScanScopeDialog) {
795784
val (title, list, isForInclude) = if (duplicateScanScope == DuplicateScanScope.INCLUDE_LIST) {
796785
Triple("Manage Include List", duplicateScanIncludeList, true)
@@ -979,20 +968,6 @@ fun SettingsScreen(
979968
}
980969
}
981970

982-
@Composable
983-
private fun GitHubSuspensionDialog(onDismiss: () -> Unit) {
984-
AppDialog(
985-
onDismissRequest = onDismiss,
986-
title = { Text("About GitHub...") },
987-
text = { Text("We moved to GitLab because of a random and unjustified suspension on GitHub. We're hoping for a reply to our appeal and a formal explanation.") },
988-
buttons = {
989-
TextButton(onClick = onDismiss) {
990-
Text("Close")
991-
}
992-
}
993-
)
994-
}
995-
996971
private fun formatPathForDisplay(path: String): Pair<String, String> {
997972
val file = File(path)
998973
val name = file.name

app/src/main/java/com/cleansweep/ui/screens/settings/SettingsViewModel.kt

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ data class SettingsUiState(
8787
val searchQuery: String = "",
8888
val showDuplicateScanScopeDialog: Boolean = false,
8989
val showDuplicateScanScopeFolderSearch: Boolean = false,
90-
val isSearchingForIncludeList: Boolean = true,
91-
val showGitHubSuspensionDialog: Boolean = false
90+
val isSearchingForIncludeList: Boolean = true
9291
)
9392

9493
@OptIn(FlowPreview::class)
@@ -1055,13 +1054,4 @@ class SettingsViewModel @Inject constructor(
10551054
}
10561055
}
10571056
}
1058-
1059-
// --- GitHub Suspension Dialog ---
1060-
fun showGitHubSuspensionDialog() {
1061-
_uiState.update { it.copy(showGitHubSuspensionDialog = true) }
1062-
}
1063-
1064-
fun dismissGitHubSuspensionDialog() {
1065-
_uiState.update { it.copy(showGitHubSuspensionDialog = false) }
1066-
}
10671057
}

0 commit comments

Comments
 (0)