Thanks to visit codestin.com
Credit goes to github.com

Skip to content

REF: Add backoff support so widget can rest if network requires it#8122

Merged
GladosBlueWallet merged 2 commits into
masterfrom
androidwi
Oct 16, 2025
Merged

REF: Add backoff support so widget can rest if network requires it#8122
GladosBlueWallet merged 2 commits into
masterfrom
androidwi

Conversation

@marcosrdz

Copy link
Copy Markdown
Member

No description provided.

@marcosrdz marcosrdz requested a review from Copilot October 13, 2025 06:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds backoff support and improved widget management for Android widgets in the BlueWallet app. The changes enable widgets to handle network failures gracefully with exponential backoff retry mechanisms and enhanced resizing capabilities.

Key changes:

  • Added exponential backoff and network constraint handling to widget update workers
  • Enhanced widget XML configurations with resize support and keyguard display capabilities
  • Improved widget lifecycle management with better caching and immediate update scheduling

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
market_widget_info.xml Added resize capabilities and keyguard support to market widget configuration
bitcoin_price_widget_info.xml Added resize capabilities and keyguard support to bitcoin price widget configuration
WidgetUpdateWorker.kt Implemented exponential backoff policy and network constraints for widget updates
MarketWidget.kt Enhanced widget lifecycle with immediate updates and proper cleanup
BitcoinPriceWidget.kt Added cached data display and improved widget initialization
AppWidgetUtils.kt Added widget pinning support and utility functions for widget management

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

* Schedule a retry when network becomes available
*/
fun scheduleRetryOnNetworkAvailable(context: Context, appWidgetIds: IntArray) {
fun scheduleRetryOnNetworkAvailable(context: Context) {

Copilot AI Oct 13, 2025

Copy link

Choose a reason for hiding this comment

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

The function signature has been changed from scheduleRetryOnNetworkAvailable(context: Context, appWidgetIds: IntArray) to scheduleRetryOnNetworkAvailable(context: Context), removing the appWidgetIds parameter. This is a breaking change that could affect callers expecting to pass widget IDs for targeted updates.

Copilot uses AI. Check for mistakes.
super.onDisabled(context)
Log.d(TAG, "onDisabled called")
clearCache(context)
context.getSharedPreferences(SHARED_PREF_NAME, Context.MODE_PRIVATE).edit().clear().apply()

Copilot AI Oct 13, 2025

Copy link

Choose a reason for hiding this comment

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

This inline SharedPreferences clearing duplicates the logic that was previously in the removed clearCache method. Consider extracting this into a private method for better maintainability and consistency with the clearMarketData method in MarketWidget.

Copilot uses AI. Check for mistakes.
@marcosrdz marcosrdz requested a review from Overtorment October 13, 2025 11:06
@GladosBlueWallet

Copy link
Copy Markdown
Collaborator

Wake the fuck up samurai, we have PRs to merge

image

[all PRs for @Overtorment] https://github.com/BlueWallet/BlueWallet/pulls/review-requested/Overtorment

@Overtorment Overtorment left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@GladosBlueWallet GladosBlueWallet merged commit 5de10d6 into master Oct 16, 2025
13 checks passed
@GladosBlueWallet

Copy link
Copy Markdown
Collaborator

Unbelievable. You, [subject name here], must be the pride of [subject hometown here]!

@GladosBlueWallet GladosBlueWallet deleted the androidwi branch October 16, 2025 10:27
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.

4 participants