Skip to content

Commit

Permalink
Merge branch 'develop' into new-icons-11
Browse files Browse the repository at this point in the history
  • Loading branch information
RaduBratan committed Jan 11, 2025
2 parents c5f3bcd + 0000137 commit 7d15b19
Show file tree
Hide file tree
Showing 19 changed files with 61 additions and 58 deletions.
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,14 @@ trim_trailing_whitespace = true
ij_kotlin_imports_layout = *
ij_kotlin_allow_trailing_comma = true
ij_kotlin_allow_trailing_comma_on_call_site = true
ij_kotlin_name_count_to_use_star_import = 999
ij_kotlin_name_count_to_use_star_import_for_members = 999
ij_kotlin_packages_to_use_import_on_demand = unset
ktlint_code_style = intellij_idea
ktlint_function_naming_ignore_when_annotated_with = Composable
ktlint_standard_discouraged-comment-location = disabled
ktlint_standard_function-expression-body = disabled
ktlint_compose_lambda-param-event-trailing = disabled

[*.md]
trim_trailing_whitespace = false
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ contact_links:
- name: Link apps to identical icons
url: https://github.com/LawnchairLauncher/lawnicons/blob/develop/CONTRIBUTING.md#adding-an-icon-to-lawnicons
about: Learn more about linking an app to an existing icon via a pull request.
- name: Currently suspended — Icon Request
url: https://forms.gle/xt7sJhgWEasuo9TR9
- name: Icon request
url: https://forms.gle/nR4ozeeJBKrLwGfk6
about: Please request your icons in this form.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,12 @@ Please check [the icon tool guide](/docs/icontool_guide.md) for more information
4. Done! You're ready to open a pull request. Please set `develop` as the base branch.

## Finding the package and activity name of an app

<!--
### Using Lawnicons
1. Install and open [Lawnicons 2.10+](https://github.com/LawnchairLauncher/lawnicons/releases).
2. Tap "Request icons". After that, our request form will open with a response ready to be submit.
3. Submit the response. You can copy the submitted activities [from our table](https://docs.google.com/spreadsheets/d/1AXc9EDXA6udZeGROtB5nuABjM33VluGY_V24tIzHaKc/edit?resourcekey=&gid=1039095616#gid=1039095616) (sorted by date).

-->
### Using `adb`
1. Connect your Android device or emulator to your laptop/desktop PC that has `adb` installed (see [this tutorial](https://www.xda-developers.com/install-adb-windows-macos-linux/) for more information) and open the app whose details you want to inspect, e.g. Telegram.
2. Open a new Command Prompt or Terminal window and input `adb devices`.
Expand Down
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<a href="https://github.com/LawnchairLauncher/lawnicons/actions/workflows/build_release_apk.yml">
<img alt="GitHub Actions Workflow Status" src="https://img.shields.io/github/actions/workflow/status/LawnchairLauncher/lawnicons/build_release_apk.yml?label=Build%20Release%20APK&logo=github">
</a>
<a h ref="https://discord.gg/3x8qNWxgGZ">
<a href="https://discord.gg/3x8qNWxgGZ">
<img alt="Discord" src="https://img.shields.io/discord/803299970169700402?logo=discord&logoColor=white&label=Discord&color=5165f6">
</a>

Expand Down Expand Up @@ -51,9 +51,6 @@ Please see our guidelines for information on contributing icons or code, it will
[Lawnicons guidelines](CONTRIBUTING.md)[Icon samples in Figma](https://www.figma.com/community/file/1227718471680779613)[Popular icon requests](https://docs.google.com/spreadsheets/d/1AXc9EDXA6udZeGROtB5nuABjM33VluGY_V24tIzHaKc/edit?resourcekey=&gid=609680142#gid=609680142)[Development issues](https://github.com/LawnchairLauncher/lawnicons/issues)

## Requesting icons
> [!NOTE]
> Request acceptance is currently closed.
[Icon request form](https://forms.gle/nR4ozeeJBKrLwGfk6)[Report outdated icons](https://github.com/LawnchairLauncher/lawnicons/issues/new?assignees=&labels=icon+update&projects=&template=icon_rebrand.yml)

`Open Lawnicons 2.10+ → Tap "Request icons" → Submit the response`

[Report outdated icons](https://github.com/LawnchairLauncher/lawnicons/issues/new?assignees=&labels=icon+update&projects=&template=icon_rebrand.yml)
<!-- `Open Lawnicons 2.13+ → Tap "Request icons" → Submit the response` -->
3 changes: 3 additions & 0 deletions app/assets/appfilter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4703,6 +4703,7 @@
<item component="ComponentInfo{com.bsb.hike/com.bsb.hike.ui.HomeActivity}" drawable="hike_messenger" name="hike messenger" />
<item component="ComponentInfo{com.fingersoft.hillclimb/com.fingersoft.game.MainActivity}" drawable="hill_climb_racing" name="Hill Climb Racing" />
<item component="ComponentInfo{com.fingersoft.hcr2/com.fingersoft.hcr2.AppActivity}" drawable="hill_climb_racing_2" name="Hill Climb Racing 2" />
<item component="ComponentInfo{com.hiloenergie.hilo/com.hiloenergie.hilo.LauncherActivity}" drawable="hilo" name="Hilo" />
<item component="ComponentInfo{co.hinge.app/co.hinge.app.ui.AppActivity}" drawable="hinge" name="Hinge" />
<item component="ComponentInfo{co.hinge.app/co.hinge.launch.LaunchActivity}" drawable="hinge" name="Hinge" />
<item component="ComponentInfo{com.transsion.hilauncher/com.transsion.theme.common.XThemeMain}" drawable="hios_launcher" name="HiOS Launcher" />
Expand Down Expand Up @@ -5871,6 +5872,7 @@
<item component="ComponentInfo{com.lofter.android/com.lofter.android.global.splash.HomeActivity}" drawable="lofter" name="LOFTER" />
<item component="ComponentInfo{com.lofter.android/com.lofter.android.global.home.TabHomeActivity}" drawable="lofter" name="LOFTER" />
<item component="ComponentInfo{com.dp.logcatapp/com.dp.logcatapp.activities.SplashActivity}" drawable="logcat_reader" name="Logcat Reader" />
<item component="ComponentInfo{com.f0x1d.logfox/com.f0x1d.logfox.presentation.ui.activity.MainActivity}" drawable="logfox" name="LogFox" />
<item component="ComponentInfo{com.f0x1d.logfox/com.f0x1d.logfox.ui.activity.MainActivity}" drawable="logfox" name="LogFox" />
<item component="ComponentInfo{com.duracodefactory.logiccircuitsimulatorpro/com.duracodefactory.logiccircuitsimulatorpro.MainActivity}" drawable="logic_circuit_simulator_pro" name="Logic Circuit Simulator Pro" />
<item component="ComponentInfo{com.logos.androidlogos/md56ab619a8c39531950374b1258c5efd44.SplashScreen}" drawable="logos_bible_study" name="Logos Bible Study" />
Expand Down Expand Up @@ -8492,6 +8494,7 @@
<item component="ComponentInfo{com.plexapp.android/com.plexapp.plex.activities.SplashActivity}" drawable="plex" name="Plex" />
<item component="ComponentInfo{tv.plex.labs.dash/tv.plex.labs.dashboard.MainActivity}" drawable="plex_dash" name="Plex Dash" />
<item component="ComponentInfo{tv.plex.labs.plexamp/com.plexamp.MainActivity}" drawable="plexamp" name="Plexamp" />
<item component="ComponentInfo{tech.techlore.plexus/tech.techlore.plexus.activities.FirstActivity}" drawable="plexus" name="Plexus" />
<item component="ComponentInfo{tech.techlore.plexus/tech.techlore.plexus.activities.SplashActivity}" drawable="plexus" name="Plexus" />
<item component="ComponentInfo{com.EmasDigi/com.emasdigi.Pluang.ui.splash.SplashActivity}" drawable="pluang" name="Pluang" />
<item component="ComponentInfo{com.wstxda.voicegpt/com.wstxda.voicegpt.VoiceGptActivity}" drawable="plugin_voicegpt" name="Plugin-VoiceGPT" />
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ dependencies {
implementation("androidx.navigation:navigation-compose:2.8.5")
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.8.7")

implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.8.0")

val hiltVersion = "2.53.1"
val hiltVersion = "2.55"
implementation("com.google.dagger:hilt-android:$hiltVersion")
ksp("com.google.dagger:hilt-compiler:$hiltVersion")
implementation("androidx.hilt:hilt-navigation-compose:1.2.0")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@ object OssLibraryRepositoryModule {

@Provides
@Singleton
fun provideOssLibraryRepository(application: Application): OssLibraryRepository =
OssLibraryRepositoryImpl(application = application)
fun provideOssLibraryRepository(application: Application): OssLibraryRepository = OssLibraryRepositoryImpl(application = application)
}
Original file line number Diff line number Diff line change
Expand Up @@ -101,31 +101,30 @@ class IconRepositoryImpl @Inject constructor(application: Application) : IconRep
_searchedIconInfoModel.value = _iconInfoModel.value
}

private suspend fun getIconRequestList(systemPackageList: List<IconInfo>) =
withContext(Dispatchers.Default) {
val lawniconsData = _iconInfoModel.value.iconInfo
private suspend fun getIconRequestList(systemPackageList: List<IconInfo>) = withContext(Dispatchers.Default) {
val lawniconsData = _iconInfoModel.value.iconInfo

val systemData = systemPackageList.map { info ->
info.getFirstLabelAndComponent()
val systemData = systemPackageList.map { info ->
info.getFirstLabelAndComponent()
}

val lawniconsComponents = lawniconsData
.splitByComponentName()
.map { it.getFirstLabelAndComponent().componentName }
.sortedBy { it.lowercase() }
.toSet()

val commonItems = systemData.filter { it.componentName !in lawniconsComponents }
.map {
IconRequest(
label = it.label,
componentName = it.componentName,
)
}

val lawniconsComponents = lawniconsData
.splitByComponentName()
.map { it.getFirstLabelAndComponent().componentName }
.sortedBy { it.lowercase() }
.toSet()

val commonItems = systemData.filter { it.componentName !in lawniconsComponents }
.map {
IconRequest(
label = it.label,
componentName = it.componentName,
)
}

iconRequestList.value = IconRequestModel(
list = commonItems,
iconCount = commonItems.size,
)
}
iconRequestList.value = IconRequestModel(
list = commonItems,
iconCount = commonItems.size,
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class DummySharedPreferences : SharedPreferences {
/**
* Dummy implementation of [SharedPreferences.Editor] for Compose previews
*/
class DummyEditor() : SharedPreferences.Editor {
class DummyEditor : SharedPreferences.Editor {
override fun putString(key: String?, value: String?) = DummyEditor()
override fun putStringSet(key: String?, values: MutableSet<String>?) = DummyEditor()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,7 @@ private fun HandleTouchInteractions(
}
}

private fun formatIconRequestList(iconRequestList: List<IconRequest>) =
iconRequestList.joinToString("\n") { "${it.label}\n${it.componentName}" }
private fun formatIconRequestList(iconRequestList: List<IconRequest>) = iconRequestList.joinToString("\n") { "${it.label}\n${it.componentName}" }

private fun handleRequestClick(
iconRequestList: List<IconRequest>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ fun Context.getIconInfo(
while (
(
parser.next()
.also { type = it } != XmlPullParser.END_TAG || parser.depth > depth
.also { type = it } != XmlPullParser.END_TAG ||
parser.depth > depth
) &&
type != XmlPullParser.END_DOCUMENT
) {
Expand All @@ -43,7 +44,8 @@ fun Context.getIconInfo(
val parsedComponent =
component.substring(componentInfoPrefixLength, component.length - 1)

if (parsedComponent.isNotEmpty() && !parsedComponent.startsWith("/") &&
if (parsedComponent.isNotEmpty() &&
!parsedComponent.startsWith("/") &&
!parsedComponent.endsWith("/")
) {
actualComponent = parsedComponent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ import kotlinx.coroutines.flow.stateIn
@HiltViewModel
class AcknowledgementViewModel @Inject constructor(
private val ossLibraryRepository: OssLibraryRepository,
) :
ViewModel() {
) : ViewModel() {

val ossLibraries = ossLibraryRepository.ossLibraries

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ class LawniconsViewModelImpl @Inject constructor(
private val iconRepository: IconRepository,
private val newIconsRepository: NewIconsRepository,
private val iconRequestSettingsRepository: IconRequestSettingsRepository,
) : LawniconsViewModel, ViewModel() {
) : ViewModel(),
LawniconsViewModel {
override val iconInfoModel = iconRepository.iconInfoModel
override val searchedIconInfoModel = iconRepository.searchedIconInfoModel
override val iconRequestModel = iconRepository.iconRequestList
Expand Down
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import com.diffplug.gradle.spotless.SpotlessExtension
import com.diffplug.spotless.extra.wtp.EclipseWtpFormatterStep

plugins {
id("com.android.application") version "8.7.3" apply false
id("com.android.application") version "8.8.0" apply false
id("org.jetbrains.kotlin.android") version "2.1.0" apply false
id("org.jetbrains.kotlin.plugin.compose") version "2.1.0"
id("org.jetbrains.kotlin.plugin.serialization") version "2.1.0" apply false
id("com.google.devtools.ksp") version "2.1.0-1.0.29" apply false
id("com.google.dagger.hilt.android") version "2.53.1" apply false
id("com.google.dagger.hilt.android") version "2.55" apply false
id("app.cash.licensee") version "1.12.0" apply false
id("com.diffplug.spotless") version "6.25.0" apply false
id("com.diffplug.spotless") version "7.0.1" apply false
id("org.gradle.android.cache-fix") version "3.0.1" apply false
}

Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=f397b287023acdba1e9f6fc5ea72d22dd63669d59ed4a289a29b1a76eee151c6
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
distributionSha256Sum=7a00d51fb93147819aab76024feece20b6b84e420694101f276be952e08bef03
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
3 changes: 1 addition & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
2 changes: 1 addition & 1 deletion svg-processor/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ application {
}

dependencies {
implementation("com.android.tools:sdk-common:31.7.3")
implementation("com.android.tools:sdk-common:31.8.0")
implementation("org.dom4j:dom4j:2.1.4")
implementation("commons-io:commons-io:2.18.0")
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ object SvgFilesProcessor {
}

private val fileVisitor = object : FileVisitor<Path> {
override fun postVisitDirectory(dir: Path, exc: IOException?): FileVisitResult =
FileVisitResult.CONTINUE
override fun postVisitDirectory(dir: Path, exc: IOException?): FileVisitResult = FileVisitResult.CONTINUE

override fun preVisitDirectory(dir: Path, attrs: BasicFileAttributes?): FileVisitResult {
// Skip folder which is processing svgs to xml
Expand All @@ -78,8 +77,7 @@ object SvgFilesProcessor {
return FileVisitResult.CONTINUE
}

override fun visitFileFailed(file: Path, exc: IOException?): FileVisitResult =
FileVisitResult.CONTINUE
override fun visitFileFailed(file: Path, exc: IOException?): FileVisitResult = FileVisitResult.CONTINUE
}

private fun convertToVector(svgSource: Path, vectorTargetPath: Path) {
Expand Down
1 change: 1 addition & 0 deletions svgs/hilo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7d15b19

Please sign in to comment.