Skip to content

Commit

Permalink
fix:#320 remove bookmarks when typing input url.
Browse files Browse the repository at this point in the history
  • Loading branch information
plateaukao committed Jan 21, 2024
1 parent 0cd63de commit 0c7d104
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1895,7 +1895,7 @@ open class BrowserActivity : FragmentActivity(), BrowserController {
isWideLayout = ViewUnit.isWideLayout(this@BrowserActivity)
shouldReverse = !config.isToolbarOnTop
hasCopiedText = getClipboardText().isNotEmpty()
lifecycleScope.launch { binding.inputUrl.recordList.value = recordDb.listEntries(true) }
lifecycleScope.launch { binding.inputUrl.recordList.value = recordDb.listEntries(false) }
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,29 @@ import android.app.Activity
import android.content.Context
import android.util.AttributeSet
import android.view.KeyEvent.KEYCODE_ENTER
import androidx.compose.foundation.*
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.text.BasicTextField
import androidx.compose.foundation.text.KeyboardActions
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.material.*
import androidx.compose.runtime.*
import androidx.compose.material.Icon
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.MutableState
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.focus.FocusRequester
Expand Down Expand Up @@ -105,7 +121,7 @@ fun AutoCompleteTextField(
it.title?.contains(text.value.text, ignoreCase = true) == true
|| it.url.contains(text.value.text, ignoreCase = true)
}
if (list.isNotEmpty()) list else recordList.value
list.ifEmpty { recordList.value }
}

Column(
Expand Down

0 comments on commit 0c7d104

Please sign in to comment.