From 8484af46986cff09ed4394a6bc548850caf77f32 Mon Sep 17 00:00:00 2001 From: Thodoris1999 Date: Sun, 2 Sep 2018 18:21:59 +0300 Subject: [PATCH] disable scrolling on new topics --- .../java/gr/thmmy/mthmmy/activities/topic/TopicActivity.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicActivity.java b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicActivity.java index 8ba2bae3..0c87db43 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicActivity.java @@ -172,6 +172,7 @@ public class TopicActivity extends BaseActivity implements TopicAdapter.OnPostFo //LinearLayoutManager layoutManager = new LinearLayoutManager(getApplicationContext()); CustomLinearLayoutManager layoutManager = new CustomLinearLayoutManager( getApplicationContext(), topicPageUrl); + recyclerView.setLayoutManager(layoutManager); topicAdapter = new TopicAdapter(this, postsList); recyclerView.setAdapter(topicAdapter); @@ -632,10 +633,10 @@ public class TopicActivity extends BaseActivity implements TopicAdapter.OnPostFo postsList.addAll(postList); topicAdapter.notifyDataSetChanged(); }); - viewModel.getFocusedPostIndex().observe(this, focusedPostIndex -> { + /*viewModel.getFocusedPostIndex().observe(this, focusedPostIndex -> { if (focusedPostIndex == null) return; recyclerView.scrollToPosition(focusedPostIndex); - }); + });*/ viewModel.getTopicTaskResultCode().observe(this, resultCode -> { if (resultCode == null) return; progressBar.setVisibility(ProgressBar.GONE);