mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 01:08:50 -06:00
Refresh also main activity when history editor closes
This commit is contained in:
@@ -107,6 +107,11 @@ public class HabitBroadcastReceiver extends BroadcastReceiver
|
||||
habit.save();
|
||||
dismissNotification(context, habit);
|
||||
|
||||
sendRefreshBroadcast(context);
|
||||
}
|
||||
|
||||
public static void sendRefreshBroadcast(Context context)
|
||||
{
|
||||
LocalBroadcastManager manager = LocalBroadcastManager.getInstance(context);
|
||||
Intent refreshIntent = new Intent(MainActivity.ACTION_REFRESH);
|
||||
manager.sendBroadcast(refreshIntent);
|
||||
|
||||
@@ -34,7 +34,7 @@ import android.widget.TextView;
|
||||
import org.isoron.helpers.ColorHelper;
|
||||
import org.isoron.helpers.Command;
|
||||
import org.isoron.helpers.DialogHelper;
|
||||
import org.isoron.uhabits.MainActivity;
|
||||
import org.isoron.uhabits.HabitBroadcastReceiver;
|
||||
import org.isoron.uhabits.R;
|
||||
import org.isoron.uhabits.ShowHabitActivity;
|
||||
import org.isoron.uhabits.dialogs.HistoryEditorDialog;
|
||||
@@ -174,7 +174,7 @@ public class ShowHabitFragment extends Fragment
|
||||
public void onHistoryEditorClosed()
|
||||
{
|
||||
refreshData();
|
||||
MainActivity.updateWidgets(getActivity());
|
||||
HabitBroadcastReceiver.sendRefreshBroadcast(getActivity());
|
||||
}
|
||||
|
||||
private void refreshData()
|
||||
|
||||
Reference in New Issue
Block a user