Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
feelfreelinux committed Nov 25, 2017
1 parent bfb30a1 commit 9b5939c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ android {
applicationId "io.github.feelfreelinux.wykopmobilny"
minSdkVersion 17
targetSdkVersion 26
versionCode 9
versionCode 10
versionName "0.3.0"

def credentialsPropertiesFile = rootProject.file("credentials.properties")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ class WykopSuggestionsAdapter(context: Context, private val textViewResourceId:
if (text.contains('@')) {
val typedText = text.substringAfterLast('@')
if (typedText.isNotEmpty()) {
if (!typedText.matches(".*([ \\t]).*".toRegex())) {
if (typedText.length >= 2) {
if (typedText.matches("^[\\w-]+\$".toRegex())) {
if (typedText.length > 2) {
var suggestions = suggestApi.getUserSuggestions(typedText)
.blockingGet()
suggestions = if (suggestions.size > 7) suggestions.subList(0, 7) else suggestions
Expand All @@ -60,8 +60,8 @@ class WykopSuggestionsAdapter(context: Context, private val textViewResourceId:
if (text.contains('#')) {
val typedText = text.substringAfterLast('#')
if (typedText.isNotEmpty()) {
if (!typedText.matches(".*([ \\t]).*".toRegex())) {
if (typedText.length >= 2) {
if (typedText.matches("^[\\w-]+\$".toRegex())) {
if (typedText.length > 2) {
var suggestions = suggestApi.getTagSuggestions(typedText)
.blockingGet()
suggestions = if (suggestions.size > 7) suggestions.subList(0, 7) else suggestions
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_write_comment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
<io.github.feelfreelinux.wykopmobilny.ui.widgets.FloatingImageView
android:id="@+id/floatingImageView"
android:layout_width="wrap_content"
android:layout_height="200dp"
android:layout_height="80dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
Expand Down
16 changes: 8 additions & 8 deletions app/src/main/res/layout/floating_image_view_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="match_parent">

<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:background="?attr/cardViewColor">

<View
Expand All @@ -20,18 +20,18 @@

<ScrollView
android:id="@+id/imageViewScrollView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/separator"
app:layout_constraintBottom_toBottomOf="parent">
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/separator">

<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"/>
android:adjustViewBounds="true" />

</ScrollView>

Expand Down

0 comments on commit 9b5939c

Please sign in to comment.