Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ ALWAYS use the `task *` commands

| Command | Purpose |
| -------------- | ---------------------------------------- |
| `task lint` | Gradle Lint |
| `task compile` | Compile Kotlin |
| `task debug` | Build debug variant (APK) |
| `task release` | Build release variant (APK) |
| `task bundle` | Build Android App Bundle (AAB) |
| `task lint` | Prettier check + yamllint + actionlint |
| `task check` | Prettier check (check non-kotlin files) |
| `task format` | Prettier write (format non-kotlin files) |

Do NOT use `-q` or pipe Gradle output through `Select-Object` — both hide progress and make long builds look hung.
Expand Down
13 changes: 9 additions & 4 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,27 @@ tasks:
- rm -rf .cache
- zensical serve --open

lint:
desc: Lint
check:
desc: Check Non-Kotlin Files
aliases: [prettier:check]
cmds:
- prettier --check .
- yamllint -c .github/yamllint.yaml .
- actionlint -shellcheck="-e SC2129"

format:
desc: Format
desc: Format Non-Kotlin Files
aliases: [prettier, prettier:write]
cmds:
- prettier --write .

lint:
desc: Gradle Lint
cmd: "{{.GRADLEW}} lint {{.CLI_ARGS}}"

compile:
desc: Compile Kotlin
cmd: "{{.GRADLEW}} :app:compileDebugKotlin"
cmd: "{{.GRADLEW}} :app:compileDebugKotlin {{.CLI_ARGS}}"

debug:
desc: Build Debug (recommended android studio)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import org.cssnr.remotewallpaper.db.HistoryItem
import java.time.Instant
import java.time.ZoneId
import java.time.format.DateTimeFormatter
import java.util.Locale

class HistoryAdapter(
private var items: List<HistoryItem>,
Expand Down Expand Up @@ -63,8 +64,8 @@ class HistoryAdapter(
} else {
holder.itemUrl.text = items[position].url
}
holder.itemCode.text = items[position].status.toString()
holder.itemId.text = items[position].id.toString()
holder.itemCode.text = String.format(Locale.getDefault(), "%d", items[position].status)
holder.itemId.text = String.format(Locale.getDefault(), "%d", items[position].id)
// Date
val instant = Instant.ofEpochMilli(items[position].timestamp)
val zonedDateTime = instant.atZone(ZoneId.systemDefault())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import org.cssnr.remotewallpaper.R
import org.cssnr.remotewallpaper.databinding.FragmentHistoryBinding
import org.cssnr.remotewallpaper.db.HistoryDatabase
import org.cssnr.remotewallpaper.db.HistoryItem
import java.util.Locale

const val LOG_TAG = "History"

Expand Down Expand Up @@ -198,7 +199,7 @@ class HistoryFragment : Fragment() {
//itemUrl.movementMethod = LinkMovementMethod.getInstance()
itemUrl.text = data.url ?: "No URL"

itemStatus.text = data.status.toString()
itemStatus.text = String.format(Locale.getDefault(), "%d", data.status)

if (!data.error.isNullOrBlank()) {
itemError.text = data.error
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/mipmap-anydpi/ic_launcher.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<monochrome android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
1 change: 1 addition & 0 deletions app/src/main/res/mipmap-anydpi/ic_launcher_round.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<monochrome android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ swiperefreshlayout = "1.2.0"
workRuntimeKtx = "2.11.2"
# viewpager2 = "1.1.0"

okhttp = "5.4.0"
okhttp = "5.5.0"
retrofit = "3.0.0"
moshiKotlinCodegen = "1.15.2"
photoview = "1.0.3"
Expand Down
Loading