Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] fixes #711 #725

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

[WIP] fixes #711 #725

wants to merge 7 commits into from

Conversation

VishnuSanal
Copy link

@VishnuSanal VishnuSanal commented May 3, 2024

fixes #711

@VishnuSanal VishnuSanal changed the title [WIP] fixes #73 [WIP] fixes #711 May 3, 2024
Copy link

what-the-diff bot commented May 3, 2024

PR Summary

  • Update on AppListAdapter.kt
    The code of our main app-listing component is refined to make it more interactive. It is now endowed with a new interactive menu feature which will show options linked to installing/uninstalling the app and adding/removing it from the favourite's list.

  • Improvement of AppListFragment.kt
    This part of the code that shows pieces of our app list screen has been revamped to use data about users' favourite apps. It incorporates the functionality to retrieve this data and pass it on to our app-listing component. It also handles the actions that users can do via the new interactive menu.

  • Refinement of AppListViewModel.kt
    Minor adjustments have been made to the sequence of property definitions to align with the overall flow.

  • Addition to strings.xml
    Two new text resources, for 'adding to favourites' and 'removing from favourites', have been introduced for better user interface interaction. These would be shown as option labels in the new interactive menu.


when (menuItem.title) {

getString(com.looker.core.common.R.string.install) -> lifecycleScope.launch {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Iamlooker I am unable to get the install to work, and I am pretty sure there's a better way around. can you point me in the right direction?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will need to create a connection with downloadService like this and then call the download function to start download service like this

I know the arch. is not the best(its genuinely bad) but I am working on it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for late reply


when (menuItem.title) {

getString(com.looker.core.common.R.string.install) -> lifecycleScope.launch {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will need to create a connection with downloadService like this and then call the download function to start download service like this

I know the arch. is not the best(its genuinely bad) but I am working on it

val packageInfo =
context.packageManager.getPackageInfoCompat(productItem.packageName)

if (packageInfo == null)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Iamlooker this always returns null, any help? :D

packageName: PackageName,
) {
scope.launch {
InstallManager(context, settingsRepository)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Iamlooker InstallManager#uninstall gets called, but uninstallItems.consumeEach doesn't get triggered. why? 🤔

PS: sorry for the delay. had exams, getting back to coding only now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add quick action buttons (menu) to app entries in the list
2 participants