mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 20:36:04 +00:00
chore: remove dead code and stale comments
This commit is contained in:
1 parent
643d82e2fd
commit
f21e84be91
17 files changed
+6
-492
No files matched your search
@@ -82,7 +82,6 @@ class MainActivity : ComponentActivity() {
|
||||
private var glThread by mutableStateOf(true)
|
||||
private var noGlError by mutableStateOf(true)
|
||||
private var steamDeckMode by mutableStateOf(false)
|
||||
private var showFrameGen by mutableStateOf(false)
|
||||
private var showCredits by mutableStateOf(false)
|
||||
private var showProtons by mutableStateOf(false)
|
||||
private var catalog by mutableStateOf<List<DesktopCatalog.Entry>?>(null)
|
||||
@@ -552,9 +551,6 @@ class MainActivity : ComponentActivity() {
|
||||
}, "remove-pkg").start()
|
||||
}
|
||||
|
||||
/** Both driver lists as the dialog shows them, re-read from disk so an import or removal shows at once. */
|
||||
/** Everything the mode's cog shows, read fresh, then the dialog. */
|
||||
/** The Steam or Desktop settings page, in the front end's pane. */
|
||||
@Composable
|
||||
private fun ModeSettingsHost(mode: String) {
|
||||
ModeSettingsPage(
|
||||
@@ -636,7 +632,6 @@ class MainActivity : ComponentActivity() {
|
||||
)
|
||||
}
|
||||
|
||||
/** The Performance page, in the front end's pane. */
|
||||
@Composable
|
||||
private fun PerformanceHost() {
|
||||
PerformancePage(
|
||||
|
||||
@@ -98,7 +98,6 @@ import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.ImageBitmap
|
||||
import androidx.compose.ui.graphics.asImageBitmap
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.input.nestedscroll.nestedScroll
|
||||
import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.graphics.vector.rememberVectorPainter
|
||||
@@ -143,10 +142,6 @@ import java.util.Locale
|
||||
*/
|
||||
enum class ConflictChoice { OVERWRITE, MERGE, KEEP_BOTH, SKIP }
|
||||
|
||||
/**
|
||||
* Ordering for the file list. Folders always lead regardless of direction - a descending sort that
|
||||
* buries every folder under the files is never what someone means by "Z to A".
|
||||
*/
|
||||
/**
|
||||
* Shortens a path from the LEFT, keeping whole segments.
|
||||
*
|
||||
@@ -164,6 +159,7 @@ private fun elidePathStart(path: String, max: Int): String {
|
||||
return if (out.isEmpty()) "…" + path.takeLast(max - 1) else "…$out"
|
||||
}
|
||||
|
||||
/** Folder-first ordering stays fixed across both sort directions. */
|
||||
private fun comparatorFor(sortBy: String, desc: Boolean): Comparator<File> {
|
||||
val inner: Comparator<File> = when (sortBy) {
|
||||
"date" -> compareBy { it.lastModified() }
|
||||
@@ -176,17 +172,9 @@ private fun comparatorFor(sortBy: String, desc: Boolean): Comparator<File> {
|
||||
return compareBy<File> { if (it.isDirectory) 0 else 1 }.then(directed)
|
||||
}
|
||||
|
||||
private val FileTypeIcon: Map<String, ImageVector> = mapOf(
|
||||
"folder" to Icons.Filled.Folder,
|
||||
)
|
||||
|
||||
// Image extensions that get a real thumbnail (via Coil) instead of the generic file icon.
|
||||
private val IMAGE_THUMB_EXTS = setOf("jpg", "jpeg", "png", "webp", "bmp", "gif")
|
||||
|
||||
// Color-only sweep: the former card-fill / card-stroke / divider / icon-blue / icon-white
|
||||
// constants were rerouted onto MaterialTheme.colorScheme tokens (surface / outline / primary /
|
||||
// onSurface) at their use sites so a theme preset/accent recolors them.
|
||||
|
||||
// True when [child] is [ancestor] itself or lives anywhere inside it.
|
||||
private fun isWithin(child: File, ancestor: File): Boolean {
|
||||
val c = runCatching { child.canonicalPath }.getOrDefault(child.absolutePath)
|
||||
@@ -937,8 +925,7 @@ fun FileManagerScreen(
|
||||
}
|
||||
|
||||
if (!showFavorites) {
|
||||
// New Folder moved off a bottom bar into the toolbar (next to the grid/list toggle),
|
||||
// as a compact outlined button, so the file list reclaims that bottom strip.
|
||||
// Keep New Folder in the toolbar so the file list uses the full height.
|
||||
if (!pickMode) {
|
||||
OutlinedButton(
|
||||
onClick = { showNewFolderDialog = true },
|
||||
@@ -1425,7 +1412,6 @@ fun FileManagerScreen(
|
||||
}
|
||||
} // end content Box (beside the rail)
|
||||
} // end rail + content Row
|
||||
// (New Folder moved into the top toolbar; the bottom bar was removed to reclaim its strip.)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1447,7 +1433,6 @@ private fun FileContextMenuItems(
|
||||
onDismissMenu: () -> Unit,
|
||||
) {
|
||||
val isDir = file.isDirectory
|
||||
// Enter multi-select on this item (replaces the old long-press-only entry point).
|
||||
DropdownMenuItem(
|
||||
text = { Text("Select") },
|
||||
leadingIcon = { Icon(Icons.Filled.Checklist, null, tint = MaterialTheme.colorScheme.primary) },
|
||||
|
||||
@@ -56,10 +56,10 @@ object AddedGames {
|
||||
"|.*installer.*|.*uninstall.*|.*updater?.*|.*config(ur.*)?|.*settings.*|.*editor.*|.*server.*|.*benchmark.*|.*helper.*|.*eac.*|.*easyanticheat.*|.*battleye.*)\\.exe$",
|
||||
)
|
||||
|
||||
/** Where a host path appears inside the session, or null when the session cannot see it. */
|
||||
/** Under here the chosen Games folders are bound inside the session, one each. */
|
||||
const val GUEST_DIR = "/root/Games"
|
||||
|
||||
/** Where a host path appears inside the session, or null when the session cannot see it. */
|
||||
fun guestPath(context: Context, host: File): String? {
|
||||
val path = host.absolutePath
|
||||
// The Games folders are bound on their own, so a folder anywhere - an SD card, a USB
|
||||
|
||||
@@ -48,7 +48,6 @@ object SessionPaths {
|
||||
return made
|
||||
}
|
||||
|
||||
/** The current session's folder, or null between sessions. */
|
||||
fun current(): File? = dir
|
||||
|
||||
/**
|
||||
@@ -63,7 +62,6 @@ object SessionPaths {
|
||||
return ended
|
||||
}
|
||||
|
||||
/** A file in the current session's folder, or null between sessions. */
|
||||
fun file(name: String): File? = dir?.let { File(it, name) }
|
||||
|
||||
/** Let the next session claim a new folder. Called when a session ends. */
|
||||
|
||||
@@ -59,8 +59,7 @@ class ModeSettings(
|
||||
val forceFullscreen: Boolean? = null,
|
||||
/** Steam only: the client branch forced on the command line. */
|
||||
val steamChannel: String? = null,
|
||||
/** Steam only: the user's own games folder and what was found in it. */
|
||||
/** The chosen Games folders (null = not a Steam page). */
|
||||
/** Steam only: the user's chosen Games folders; null outside Steam. */
|
||||
val addedGamesDirs: List<String>? = null,
|
||||
val addedGames: List<AddedGameRow> = emptyList(),
|
||||
val addedGamesArt: Boolean = true,
|
||||
|
||||
Reference in new issue
Block a user