ShowHabitRootView: update title automatically

Fixes #162
This commit is contained in:
2016-08-22 17:02:20 -04:00
parent 2bdc0b4f5e
commit b54c4de5f7

View File

@@ -20,6 +20,7 @@
package org.isoron.uhabits.activities.habits.show;
import android.content.*;
import android.os.*;
import android.support.annotation.*;
import android.support.v7.widget.*;
@@ -106,6 +107,10 @@ public class ShowHabitRootView extends BaseRootView
@Override
public void onModelChange()
{
new Handler(Looper.getMainLooper()).post(() -> {
toolbar.setTitle(habit.getName());
});
controller.onToolbarChanged();
}