-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
15 changed files
with
101 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 -- "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.