Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
aivanovski committed Jan 8, 2024
1 parent 953ba23 commit fc4d84a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
import android.view.inputmethod.InputMethodManager;
import androidx.annotation.Nullable;

import timber.log.Timber;

public class InputMethodUtils {

public static void hideSoftInput(@Nullable Activity activity) {
Expand All @@ -32,7 +30,6 @@ public static void showSoftInput(Context context, View view) {
InputMethodManager imm =
(InputMethodManager)
context.getSystemService(Context.INPUT_METHOD_SERVICE);
Timber.d("showSoftInput: hasWindowFocus=%s", view.hasWindowFocus());

if (imm != null) {
imm.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,28 +45,28 @@ import com.ivanovsky.passnotes.presentation.Screens.MainSettingsScreen
import com.ivanovsky.passnotes.presentation.Screens.NoteEditorScreen
import com.ivanovsky.passnotes.presentation.Screens.NoteScreen
import com.ivanovsky.passnotes.presentation.Screens.UnlockScreen
import com.ivanovsky.passnotes.presentation.core.BackNavigationIcon
import com.ivanovsky.passnotes.presentation.core.BaseCellViewModel
import com.ivanovsky.passnotes.presentation.core.DefaultScreenStateHandler
import com.ivanovsky.passnotes.presentation.core.ScreenDisplayingType
import com.ivanovsky.passnotes.presentation.core.ScreenState
import com.ivanovsky.passnotes.presentation.core.ViewModelTypes
import com.ivanovsky.passnotes.presentation.core.dialog.sortAndView.ScreenType
import com.ivanovsky.passnotes.presentation.core.dialog.sortAndView.SortAndViewDialogArgs
import com.ivanovsky.passnotes.presentation.core.event.EventProviderImpl
import com.ivanovsky.passnotes.presentation.core.event.LockScreenLiveEvent
import com.ivanovsky.passnotes.presentation.core.event.SingleLiveEvent
import com.ivanovsky.passnotes.presentation.core.menu.ScreenMenuItem
import com.ivanovsky.passnotes.presentation.core.model.NavigationPanelCellModel
import com.ivanovsky.passnotes.presentation.core.viewmodel.DividerCellViewModel
import com.ivanovsky.passnotes.presentation.core.viewmodel.GroupCellViewModel
import com.ivanovsky.passnotes.presentation.core.viewmodel.NavigationPanelCellViewModel
import com.ivanovsky.passnotes.presentation.core.viewmodel.NoteCellViewModel
import com.ivanovsky.passnotes.presentation.core.viewmodel.OptionPanelCellViewModel
import com.ivanovsky.passnotes.presentation.core.viewmodel.SpaceCellViewModel
import com.ivanovsky.passnotes.presentation.groupEditor.GroupEditorArgs
import com.ivanovsky.passnotes.presentation.groups.factory.GroupsCellModelFactory
import com.ivanovsky.passnotes.presentation.groups.factory.GroupsCellViewModelFactory
import com.ivanovsky.passnotes.presentation.core.BackNavigationIcon
import com.ivanovsky.passnotes.presentation.core.BaseCellViewModel
import com.ivanovsky.passnotes.presentation.core.dialog.sortAndView.ScreenType
import com.ivanovsky.passnotes.presentation.core.dialog.sortAndView.SortAndViewDialogArgs
import com.ivanovsky.passnotes.presentation.core.event.EventProviderImpl
import com.ivanovsky.passnotes.presentation.core.model.NavigationPanelCellModel
import com.ivanovsky.passnotes.presentation.core.viewmodel.NavigationPanelCellViewModel
import com.ivanovsky.passnotes.presentation.groups.model.CellsData
import com.ivanovsky.passnotes.presentation.groups.model.NavigationStackItem
import com.ivanovsky.passnotes.presentation.note.NoteScreenArgs
Expand Down Expand Up @@ -955,7 +955,9 @@ class GroupsViewModel(
}
}

private suspend fun loadSearchEntries(query: String): OperationResult<List<EncryptedDatabaseEntry>> {
private suspend fun loadSearchEntries(
query: String
): OperationResult<List<EncryptedDatabaseEntry>> {
var allEntries = searchableEntries
if (allEntries == null) {
val getAllEntriesResult = interactor.getAllSearchableEntries(
Expand All @@ -977,7 +979,7 @@ class GroupsViewModel(
val searchEntries = if (query.isNotEmpty()) {
interactor.filterEntries(
entries = allEntries,
query = query,
query = query
)
} else {
emptyList()
Expand Down

0 comments on commit fc4d84a

Please sign in to comment.