Skip to content

Commit 217e9c9

Browse files
author
Claude
committed
chore: remove dead code and clean up stale artifacts
Remove unused `getClipboardText()` from PlatformActions and all implementations. Delete obsolete EZLink.json sample file and CEPAS compat parsing from MetrodroidJsonParser. Remove stale plan documents. Also add kotlin-serialization plugin to web module, fix synchronous XHR binary loading in wasmJs ResourceAccessor, and update README WebUSB description.
1 parent fa5812e commit 217e9c9

13 files changed

Lines changed: 14 additions & 2282 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ Some MIFARE Classic cards require encryption keys to read. You can obtain keys u
184184
* **Android:** NFC-enabled device running Android 6.0 (API 23) or later
185185
* **iOS:** iPhone 7 or later with iOS support for CoreNFC
186186
* **macOS** (experimental): Mac with a PC/SC-compatible NFC smart card reader (e.g., ACR122U), a PN533-based USB NFC controller (e.g., SCL3711), or a Sony RC-S956 (PaSoRi) USB NFC reader
187-
* **Web** (experimental): Any modern browser with WebAssembly support. Card data can be imported from JSON files exported by other platforms. NFC reading via WebUSB is planned but not yet implemented.
187+
* **Web** (experimental): Any modern browser with WebAssembly support. Card data can be imported from JSON files exported by other platforms. Live NFC card reading is supported in Chrome/Edge/Opera via WebUSB with a PN533-based USB NFC reader (e.g., SCL3711).
188188

189189
## Building
190190

app/desktop/src/jvmMain/kotlin/com/codebutler/farebot/desktop/DesktopPlatformActions.kt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package com.codebutler.farebot.desktop
33
import com.codebutler.farebot.shared.platform.PlatformActions
44
import java.awt.Desktop
55
import java.awt.Toolkit
6-
import java.awt.datatransfer.DataFlavor
76
import java.awt.datatransfer.StringSelection
87
import java.io.File
98
import java.net.URI
@@ -27,15 +26,6 @@ class DesktopPlatformActions : PlatformActions {
2726
clipboard.setContents(StringSelection(text), null)
2827
}
2928

30-
override fun getClipboardText(): String? {
31-
val clipboard = Toolkit.getDefaultToolkit().systemClipboard
32-
return try {
33-
clipboard.getData(DataFlavor.stringFlavor) as? String
34-
} catch (_: Exception) {
35-
null
36-
}
37-
}
38-
3929
override fun shareText(text: String) {
4030
copyToClipboard(text)
4131
showToast("Copied to clipboard")

app/src/androidMain/kotlin/com/codebutler/farebot/app/core/platform/AndroidPlatformActions.kt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,6 @@ class AndroidPlatformActions(
8484
clipboard.setPrimaryClip(ClipData.newPlainText("FareBot", text))
8585
}
8686

87-
override fun getClipboardText(): String? {
88-
val clipboard = context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
89-
return clipboard.primaryClip
90-
?.getItemAt(0)
91-
?.text
92-
?.toString()
93-
}
94-
9587
override fun shareText(text: String) {
9688
val intent =
9789
Intent(Intent.ACTION_SEND).apply {

app/src/commonMain/composeResources/files/samples/EZLink.json

Lines changed: 0 additions & 170 deletions
This file was deleted.

app/src/commonMain/kotlin/com/codebutler/farebot/shared/platform/PlatformActions.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ interface PlatformActions {
1111

1212
fun copyToClipboard(text: String)
1313

14-
fun getClipboardText(): String?
15-
1614
fun shareText(text: String)
1715

1816
fun showToast(message: String)

0 commit comments

Comments
 (0)