Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 1db690bb authored by Marten Gajda's avatar Marten Gajda Committed by GitHub
Browse files

Always create DetailView, fixes #755 (#761)

Instead of creating the details view lazily when the task is loaded, we create it in `onCreateView` so it always exist. Hopefully this fixes #755, but since the actual reason is still unclear we can't be sure. In any case the details view needs a refactoring which reduces mutable state and makes it more robust.
parent 497f4896
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -262,6 +262,8 @@ public class ViewTaskFragment extends SupportFragment


        mRootView = inflater.inflate(R.layout.fragment_task_view_detail, container, false);
        mRootView = inflater.inflate(R.layout.fragment_task_view_detail, container, false);
        mContent = (ViewGroup) mRootView.findViewById(R.id.content);
        mContent = (ViewGroup) mRootView.findViewById(R.id.content);
        mDetailView = (TaskView) inflater.inflate(R.layout.task_view, mContent, false);
        mContent.addView(mDetailView);
        mAppBar = (AppBarLayout) mRootView.findViewById(R.id.appbar);
        mAppBar = (AppBarLayout) mRootView.findViewById(R.id.appbar);
        mToolBar = (Toolbar) mRootView.findViewById(R.id.toolbar);
        mToolBar = (Toolbar) mRootView.findViewById(R.id.toolbar);
        mToolBar.setOnMenuItemClickListener(this);
        mToolBar.setOnMenuItemClickListener(this);