ktlint: Final formatting fixes
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
@@ -124,9 +124,8 @@ private fun ScreenContent(
|
||||
|
||||
Button(
|
||||
modifier = buttonWidthModifier,
|
||||
enabled =
|
||||
!isFinalPage() ||
|
||||
(!uiState.isMicroBundleChecked || uiState.isMicroGBundleInstalled),
|
||||
enabled = !isFinalPage() ||
|
||||
(!uiState.isMicroBundleChecked || uiState.isMicroGBundleInstalled),
|
||||
onClick = {
|
||||
when {
|
||||
isFinalPage() -> onFinishOnboarding()
|
||||
|
||||
@@ -206,7 +206,8 @@ class DownloadWorker @AssistedInject constructor(
|
||||
private suspend fun onSuccess(): Result {
|
||||
return withContext(NonCancellable) {
|
||||
return@withContext try {
|
||||
if (BuildConfig.FLAVOR == FLAVOUR_HUAWEI && download.requiresGMS &&
|
||||
if (BuildConfig.FLAVOR == FLAVOUR_HUAWEI &&
|
||||
download.requiresGMS &&
|
||||
PackageUtil.hasMicroGCompanion(context)
|
||||
) {
|
||||
appInstaller.getMicroGInstaller().install(download)
|
||||
|
||||
@@ -104,7 +104,6 @@ class ExportWorker @AssistedInject constructor(
|
||||
|
||||
notificationManager = context.getSystemService<NotificationManager>()!!
|
||||
|
||||
@Suppress("ktlint:standard:mixed-condition-operators")
|
||||
if (packageName.isNullOrEmpty() || isDownload && versionCode == -1L) {
|
||||
Log.e(TAG, "Input data is corrupt, bailing out!")
|
||||
notifyStatus(displayName ?: String(), uri, false)
|
||||
|
||||
@@ -123,11 +123,12 @@ object PackageUtil {
|
||||
context,
|
||||
PACKAGE_NAME_PLAY_STORE,
|
||||
VERSION_CODE_MICROG_COMPANION_MIN
|
||||
) && hasActivity(
|
||||
context,
|
||||
PACKAGE_NAME_PLAY_STORE,
|
||||
MICROG_INSTALL_ACTIVITY
|
||||
)
|
||||
) &&
|
||||
hasActivity(
|
||||
context,
|
||||
PACKAGE_NAME_PLAY_STORE,
|
||||
MICROG_INSTALL_ACTIVITY
|
||||
)
|
||||
|
||||
fun isInstalled(context: Context, packageName: String, versionCode: Long? = null): Boolean =
|
||||
try {
|
||||
|
||||
@@ -41,8 +41,10 @@ open class GenericCarouselController(private val callbacks: Callbacks) :
|
||||
}
|
||||
|
||||
open fun applyFilter(streamBundle: StreamCluster): Boolean {
|
||||
return streamBundle.clusterTitle.isNotBlank() && // Filter noisy cluster
|
||||
streamBundle.clusterAppList.isNotEmpty() && // Filter empty clusters
|
||||
return streamBundle.clusterTitle.isNotBlank() &&
|
||||
// Filter noisy cluster
|
||||
streamBundle.clusterAppList.isNotEmpty() &&
|
||||
// Filter empty clusters
|
||||
streamBundle.clusterAppList.count() > 1 // Filter clusters with single apps (promotions)
|
||||
}
|
||||
|
||||
|
||||
@@ -71,8 +71,8 @@ class BlacklistViewModel @Inject constructor(
|
||||
if (query.isNotBlank()) {
|
||||
_filteredPackages.value = packages.value!!
|
||||
.filter {
|
||||
it.applicationInfo!!.loadLabel(context.packageManager)
|
||||
.contains(query, true) || it.packageName.contains(query, true)
|
||||
it.applicationInfo!!.loadLabel(context.packageManager).contains(query, true) ||
|
||||
it.packageName.contains(query, true)
|
||||
}
|
||||
} else {
|
||||
_filteredPackages.value = packages.value
|
||||
|
||||
Reference in New Issue
Block a user