mobile: make mobile flag runtime-configurable
we need to pass a few more things around but it's not that bad. This will allow you to launch damus with --mobile for mobile testing without recompilation.
This commit is contained in:
20
preview
20
preview
@@ -1,20 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
MOBILE_FLAG=0
|
||||
FILTERED_ARGS=()
|
||||
|
||||
# Loop through the command line arguments
|
||||
for arg in "$@"; do
|
||||
if [[ "$arg" == "--mobile" ]]; then
|
||||
MOBILE_FLAG=1
|
||||
else
|
||||
# Add non '--mobile' arguments to the filtered list
|
||||
FILTERED_ARGS+=("$arg")
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ "$MOBILE_FLAG" -eq 1 ]]; then
|
||||
cargo run --bin ui_preview --features emulate_mobile --release -- "${FILTERED_ARGS[@]}"
|
||||
else
|
||||
cargo run --bin ui_preview --release -- "$@"
|
||||
fi
|
||||
# pass --mobile for mobile previews
|
||||
cargo run --bin ui_preview --release -- "$@"
|
||||
|
||||
Reference in New Issue
Block a user