Skip to content

Commit

Permalink
Merge branch 'dev' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
tom5079 committed Sep 15, 2020
2 parents 6903382 + c7e75aa commit 9984334
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ android {
minSdkVersion 16
targetSdkVersion 30
versionCode 59
versionName "5.0.3-hotfix1"
versionName "5.0.3-hotfix2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
Expand Down
2 changes: 1 addition & 1 deletion app/release/output-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"filters": [],
"properties": [],
"versionCode": 59,
"versionName": "5.0.3-hotfix1",
"versionName": "5.0.3-hotfix2",
"enabled": true,
"outputFile": "app-release.apk"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,12 @@ class FloatingSearchViewDayNight @JvmOverloads constructor(context: Context, att
override fun onSuggestionClicked(searchSuggestion: SearchSuggestion?) {
when (searchSuggestion) {
is TagSuggestion -> {
val tag = "${searchSuggestion.n}:${searchSuggestion.s.replace(Regex("\\s"), "_")}"
with(searchInputView.text) {
delete(if (lastIndexOf(' ') == -1) 0 else lastIndexOf(' ')+1, length)
append("${searchSuggestion.n}:${searchSuggestion.s.replace(Regex("\\s"), "_")} ")
delete(if (lastIndexOf(' ') == -1) 0 else lastIndexOf(' ') + 1, length)

if (!this.contains(tag))
append("$tag ")
}
}
is Suggestion -> {
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/java/xyz/quaver/pupil/util/SavedSet.kt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ class SavedSet <T: Any> (private val file: File, private val any: T, private val
override fun add(element: T): Boolean {
load()

set.remove(element)

return set.add(element).also {
save()
}
Expand All @@ -67,6 +69,8 @@ class SavedSet <T: Any> (private val file: File, private val any: T, private val
override fun addAll(elements: Collection<T>): Boolean {
load()

set.removeAll(elements)

return set.addAll(elements).also {
save()
}
Expand Down
16 changes: 7 additions & 9 deletions app/src/main/res/layout/item_galleryblock.xml
Original file line number Diff line number Diff line change
Expand Up @@ -162,16 +162,14 @@
android:layout_marginLeft="8dp"
android:layout_marginBottom="8dp"
app:layout_constraintTop_toBottomOf="@id/galleryblock_type"
app:layout_constraintBottom_toTopOf="@id/galleryblock_padding"
app:layout_constraintLeft_toRightOf="@id/galleryblock_thumbnail" />

<View
android:id="@+id/galleryblock_padding"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/galleryblock_language"
app:layout_constraintBottom_toTopOf="@id/galleryblock_tag_group"/>
<androidx.constraintlayout.widget.Barrier
android:id="@+id/padding"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="galleryblock_language"/>

<com.google.android.material.chip.ChipGroup
android:id="@+id/galleryblock_tag_group"
Expand All @@ -181,7 +179,7 @@
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
app:chipSpacing="4dp"
app:layout_constraintTop_toBottomOf="@id/galleryblock_padding"
app:layout_constraintTop_toBottomOf="@id/padding"
app:layout_constraintLeft_toRightOf="@id/galleryblock_thumbnail"
app:layout_constraintRight_toRightOf="parent"/>

Expand Down

0 comments on commit 9984334

Please sign in to comment.