From 4338dbd2774925d9ecbe6a29616d330d5f2602a2 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Mon, 8 Jul 2019 23:54:54 +0800 Subject: Retain comments after orientation changes in ViewPostDetailActivity. --- app/src/main/java/SubredditDatabase/SubredditViewModel.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/src/main/java/SubredditDatabase') diff --git a/app/src/main/java/SubredditDatabase/SubredditViewModel.java b/app/src/main/java/SubredditDatabase/SubredditViewModel.java index a0dfa7c9..8899abdd 100644 --- a/app/src/main/java/SubredditDatabase/SubredditViewModel.java +++ b/app/src/main/java/SubredditDatabase/SubredditViewModel.java @@ -37,8 +37,9 @@ public class SubredditViewModel extends AndroidViewModel { this.subredditName = subredditName; } + @NonNull @Override - public T create(Class modelClass) { + public T create(@NonNull Class modelClass) { //noinspection unchecked return (T) new SubredditViewModel(mApplication, subredditName); } -- cgit v1.2.3