Ver Fonte

fix: app search filters from `startWith` to `contains` for more comprehensive searches

beautusg há 7 anos atrás
pai
commit
368aec7df0

+ 2 - 1
app/src/main/java/com/sduduzog/slimlauncher/ui/notes/VoiceNoteFragment.kt

@@ -156,7 +156,8 @@ class VoiceNoteFragment : BaseFragment() {
                     val newFile = File(imagePath, note.filename)
                     val contentUri = FileProvider.getUriForFile(context!!, getString(R.string.app_authority_for_file_provider), newFile)
                     val type = context!!.contentResolver.getType(contentUri)
-                    intent.setDataAndType(contentUri, type)
+                    intent.putExtra(Intent.EXTRA_STREAM, contentUri)
+                    intent.type = type
                     intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
                     startActivity(Intent.createChooser(intent, "Send audio note"))
                 }

+ 1 - 1
app/src/main/java/com/sduduzog/slimlauncher/utils/LoadInstalledApps.kt

@@ -56,6 +56,6 @@ class LoadInstalledApps(private val viewModel: MainViewModel?, private val filte
     }
 
     override fun onPostExecute(result: List<App>) {
-        viewModel?.installedApps?.value = result.filter { it.appName.startsWith(filterString, true) }
+        viewModel?.installedApps?.value = result.filter { it.appName.contains(filterString, true) }
     }
 }