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
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import androidx.sqlite.db.SimpleSQLiteQuery
import androidx.sqlite.db.SupportSQLiteQuery
import io.github.wiiznokes.gitnote.data.platform.NodeFs
import io.github.wiiznokes.gitnote.manager.Progress
import io.github.wiiznokes.gitnote.manager.isExtensionSupported
import io.github.wiiznokes.gitnote.manager.isExtensionSupportedLib
import io.github.wiiznokes.gitnote.ui.model.GridNote
import io.github.wiiznokes.gitnote.ui.model.SortOrder
import io.github.wiiznokes.gitnote.ui.screen.app.DrawerFolderModel
Expand Down Expand Up @@ -52,7 +52,7 @@ interface RepoDatabaseDao {

when (nodeFs) {
is NodeFs.File -> {
if (!isExtensionSupported(nodeFs.extension.text)) {
if (!isExtensionSupportedLib(nodeFs.extension.text)) {
//Log.d(TAG, "skipped ${nodeFs.path} because extension not supported")
return@forEachNodeFs
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ private fun extensionTypeFromNumber(num: Int): ExtensionType? =

private external fun extensionTypeLib(extension: String): Int

external fun isExtensionSupported(extension: String): Boolean
external fun isExtensionSupportedLib(extension: String): Boolean
157 changes: 54 additions & 103 deletions app/src/main/rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/src/main/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ git2 = { version = "0.20.2", features = [
"vendored-libgit2",
"vendored-openssl",
] }
jni = "0.21"
jni = "0.22"
android_logger = "0.15"
log = "0.4"
rand_core = { version = "0.6", features = ["std"] }
Expand Down
7 changes: 1 addition & 6 deletions app/src/main/rust/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,22 @@ zip_openssl_build arch:
cp -r target/{{ arch }}-linux-android/release/build/openssl-sys-*/out/openssl-build/install openssl-prebuild/{{ arch }}
zip -r install.zip openssl-prebuild/{{ arch }}/install
mv install.zip openssl-prebuild/{{ arch }}

pull: prettier fix

fix: fmt fmt-just
cargo clippy --workspace --all-features --fix --allow-dirty --allow-staged

fmt:
cargo fmt --all

fmt-just:
just --fmt --unstable

prettier:
# install on Debian: sudo snap install node --classic
# npx is the command to run npm package, node is the runtime
npx prettier -w .

sortext:
#!/usr/bin/env bash
extension_dir=supported_extensions
for f in $(ls $extension_dir 2>/dev/null); do
sort $extension_dir/$f -o $extension_dir/$f
echo sorted $f
done
done
Loading