Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
d4rken committed Oct 31, 2024
1 parent 4ec7225 commit c970d0b
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 25 deletions.
11 changes: 8 additions & 3 deletions app/src/main/java/eu/darken/apl/map/core/MapOptions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ data class MapOptions(
) : Parcelable {
@Parcelize
data class Filter(
val icaos: Set<AircraftHex> = emptySet(),
val selected: Set<AircraftHex> = emptySet(),
val filtered: Set<AircraftHex> = emptySet(),
val noIsolation: Boolean? = null,
) : Parcelable

Expand All @@ -33,13 +34,17 @@ data class MapOptions(
val urlExtra = StringBuilder()

filter.apply {
icaos
selected
.takeIf { it.isNotEmpty() }
?.joinToString(",")
?.let {
urlExtra.append("&icaoFilter=$it")
urlExtra.append("&icao=$it")
if (noIsolation == true) urlExtra.append("&noIsolation")
}
filtered
.takeIf { it.isNotEmpty() }
?.joinToString(",")
?.let { urlExtra.append("&icaoFilter=$it") }
}

rendering.apply {
Expand Down
7 changes: 4 additions & 3 deletions app/src/main/res/layout/search_list_aircraft_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

<com.google.android.material.textview.MaterialTextView
android:id="@+id/title"
style="@style/TextAppearance.Material3.TitleMedium"
style="@style/TextAppearance.Material3.TitleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
Expand Down Expand Up @@ -60,11 +60,12 @@

<com.google.android.material.textview.MaterialTextView
android:id="@+id/subtitle"
style="@style/TextAppearance.Material3.TitleSmall"
style="@style/TextAppearance.Material3.BodyMedium"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:ellipsize="end"
android:ellipsize="middle"
android:textStyle="bold"
android:singleLine="true"
android:translationY="-3dp"
app:layout_constraintBottom_toTopOf="@id/info_box"
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/layout/watchlist_list_single_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,15 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:ellipsize="middle"
android:singleLine="true"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@id/info_box"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/thumbnail"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed"
tools:text="Lockheed C-5M Super Galaxy" />
tools:text="Lockheed C-5M Super Galaxy Galaxy Lorem Ipsum" />

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/info_box"
Expand Down
32 changes: 14 additions & 18 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -127,27 +127,27 @@
<string name="watchlist_page_label">Watchlist</string>
<string name="watchlist_add_title">Add new watch</string>
<plurals name="watchlist_yours_x_active_msg">
<item quantity="one">You have %d watch</item>
<item quantity="other">You have %d watches</item>
<item quantity="one">%d watchlist entry</item>
<item quantity="other">%d watchlist entries</item>
</plurals>

<string name="watchlist_list_addnew_msg">Create your first aircraft alert now!</string>
<string name="watchlist_list_addnew_msg">Keep your eye on an aircraft O.O!</string>
<string name="watchlist_add_watch_type_label_aircraft">Aircraft (hex code) </string>
<string name="watchlist_add_watch_type_label_squawk">Transponder code (SQUAWK)</string>
<string name="watchlist_add_watch_type_label_flight">Flight (callsign)</string>
<string name="watchlist_add_aircraft_title">New aircraft alert</string>
<string name="watchlist_add_aircraft_msg">Enter the hexcode of the aircraft you want alerts for.</string>
<string name="watchlist_add_squawk_title">New squawk alert</string>
<string name="watchlist_add_squawk_msg">Enter the transpoder code you want to be alerted of.</string>
<string name="watchlist_add_flight_title">Create callsign alert</string>
<string name="watchlist_add_flight_msg">Enter the callsign (flight number) you want alerts for.</string>
<string name="watchlist_item_squawk_subtitle">Transponder code (squawk) alert</string>
<string name="watchlist_item_aircraft_subtitle">Aircraft alert</string>
<string name="watchlist_item_flight_subtitle">Flight alert</string>
<string name="watchlist_add_aircraft_title">Watch new aircraft</string>
<string name="watchlist_add_aircraft_msg">Enter the hexcode of the aircraft you want to watch.</string>
<string name="watchlist_add_squawk_title">New squawk watch</string>
<string name="watchlist_add_squawk_msg">Enter the transpoder code you want to watch.</string>
<string name="watchlist_add_flight_title">Create flight watch</string>
<string name="watchlist_add_flight_msg">Enter the callsign (flight number) you want to watch.</string>
<string name="watchlist_item_squawk_subtitle">Transponder code (squawk) watch</string>
<string name="watchlist_item_aircraft_subtitle">Watched aircraft</string>
<string name="watchlist_item_flight_subtitle">Flight watch</string>
<string name="watchlist_spotted_never_label">Never</string>
<string name="watchlist_remove_action">Delete alert</string>
<string name="watchlist_remove_action">Delete watch</string>
<string name="watchlist_remove_confirmation_title">Confirmation</string>
<string name="watchlist_remove_confirmation_message">Delete this alert?</string>
<string name="watchlist_remove_confirmation_message">Delete this watch?</string>
<string name="watchlist_watch_add_label">Add to watchlist</string>
<string name="watchlist_watch_edit_label">Edit watchlist</string>

Expand All @@ -172,10 +172,6 @@
<string name="search_progress_body">Found %d so far. Still searching…</string>
<string name="search_summary_x_aircraft">%d aircraft found</string>

<plurals name="search_aircraft_matching_alerts_desc">
<item quantity="one">You have %d matching alert.</item>
<item quantity="other">You have %d matching alerts.</item>
</plurals>
<string name="common_show_on_map">Show on map</string>
<string name="common_show_in_search">Show in search</string>
<string name="watchlist_note_label">Note</string>
Expand Down

0 comments on commit c970d0b

Please sign in to comment.