mirror of
https://github.com/SimpleMobileTools/Simple-Launcher.git
synced 2025-06-05 21:59:15 +02:00
cache launchers in a db
This commit is contained in:
@ -6,10 +6,14 @@ import android.graphics.drawable.Drawable
|
||||
import android.os.Process
|
||||
import com.simplemobiletools.commons.extensions.portrait
|
||||
import com.simplemobiletools.launcher.R
|
||||
import com.simplemobiletools.launcher.databases.AppsDatabase
|
||||
import com.simplemobiletools.launcher.helpers.Config
|
||||
import com.simplemobiletools.launcher.interfaces.AppLaunchersDao
|
||||
|
||||
val Context.config: Config get() = Config.newInstance(applicationContext)
|
||||
|
||||
val Context.launchersDB: AppLaunchersDao get() = AppsDatabase.getInstance(applicationContext).AppLaunchersDao()
|
||||
|
||||
fun Context.getColumnCount(): Int {
|
||||
return if (portrait) {
|
||||
resources.getInteger(R.integer.portrait_column_count)
|
||||
|
Reference in New Issue
Block a user