LawnchairLauncher / lawnchair

No clever tagline needed.
https://lawnchair.app
Other
8.92k stars 1.17k forks source link

[BUG] Smartspacer at glance provider limited to 5 pages/targets #4328

Open pogman-code opened 3 months ago

pogman-code commented 3 months ago

Describe the bug

If Smartspacer has more than 5 target, only the first 5 are show in the "At a Glance" widget.

Steps to reproduce

Steps to reproduce the behavior:

  1. Install Smartspacer
  2. Add more than 5 targets to Smartspacer
  3. Go to Lawnchair Settings
  4. Click on At A Glance
  5. Change provider to Smartspacer
  6. Go back to home screen
  7. Only the 5 first smartspacer target are shown

Expected behavior

All Smartspacer targets should be show in "At a Glance" widget.

Screenshots

No response

Device information

Additional context

No response

MrSluffy commented 1 month ago

Please report it in smart spacer repo, lawnchair does not control the smart spacer target other than displaying it

KieronQuinn commented 1 month ago

Please report it in smart spacer repo, lawnchair does not control the smart spacer target other than displaying it

Technically it does, although it's currently hard coded to 5 pages as it's using the View which is designed to be drop in and not be able to override that: https://github.com/KieronQuinn/Smartspacer/blob/962beac6efba350a594eb11bef306e1a11fa4d27/sdk-client/src/main/java/com/kieronquinn/app/smartspacer/sdk/client/views/BcSmartspaceView.kt#L44

If I were to add an override option, Lawnchair would need to add a UI element to configure that. Alternatively, you could just use the override to set it to MAX_INT, which is what the unlimited option would do anyway.

What do you think?

KieronQuinn commented 3 weeks ago

I've just released 1.0.11 of the client SDK, which now exposes the SmartspaceConfig for BcSmartspaceView.

If you wish to just disable the limit, simply override config in SmartspacerView:

override val config = SmartspaceConfig(Int.MAX_VALUE, UiSurface.HOMESCREEN, context.packageName)

If you wish to add limit disabling as an option, you'll need to add further code however.