mirror of
https://github.com/CatimaLoyalty/Android.git
synced 2026-05-11 09:33:04 -04:00
Refactor deprecated widget code
This replaces the deprecated widget method with the new one and ensures it consistently updates on changes.
This commit is contained in:
@@ -431,13 +431,7 @@ public class MainActivity extends CatimaAppCompatActivity implements LoyaltyCard
|
||||
mCurrentActionMode.finish();
|
||||
}
|
||||
|
||||
updateWidget(mAdapter.mContext);
|
||||
}
|
||||
|
||||
private void updateWidget(Context context) {
|
||||
AppWidgetManager manager = AppWidgetManager.getInstance(context);
|
||||
int[] ids = manager.getAppWidgetIds(new ComponentName(context, CatimaWidget.class));
|
||||
manager.notifyAppWidgetViewDataChanged(ids, R.id.grid_view);
|
||||
new CatimaWidget().updateAll(mAdapter.mContext);
|
||||
}
|
||||
|
||||
private void processParseResultList(List<ParseResult> parseResultList, String group, boolean closeAppOnNoBarcode) {
|
||||
|
||||
Reference in New Issue
Block a user