diff --git a/OpenEdXMobile/src/main/java/org/edx/mobile/util/Config.java b/OpenEdXMobile/src/main/java/org/edx/mobile/util/Config.java index f91d19ffd0..a26a6a047b 100644 --- a/OpenEdXMobile/src/main/java/org/edx/mobile/util/Config.java +++ b/OpenEdXMobile/src/main/java/org/edx/mobile/util/Config.java @@ -595,6 +595,7 @@ public boolean isNewLogistrationEnabled() { public boolean isDiscussionProfilePicturesEnabled() { return getBoolean(DISCUSSIONS_ENABLE_PROFILE_PICTURE_PARAM, false); } + public boolean isRegistrationEnabled() { return getBoolean(REGISTRATION_ENABLED, true); } @@ -652,6 +653,7 @@ public boolean isWhatsNewEnabled() { public boolean isCourseVideosEnabled() { return getBoolean(COURSE_VIDEOS_ENABLED, true); } + public boolean isAnnouncementEnabled() { return getBoolean(ANNOUNCEMENTS_ENABLED, true); } diff --git a/OpenEdXMobile/src/main/java/org/edx/mobile/view/CourseDiscussionResponsesFragment.java b/OpenEdXMobile/src/main/java/org/edx/mobile/view/CourseDiscussionResponsesFragment.java index c29fcd581d..06277bccc1 100644 --- a/OpenEdXMobile/src/main/java/org/edx/mobile/view/CourseDiscussionResponsesFragment.java +++ b/OpenEdXMobile/src/main/java/org/edx/mobile/view/CourseDiscussionResponsesFragment.java @@ -267,12 +267,10 @@ public ResponsesLoader(@ActivityContext @NonNull Context context, @NonNull Strin this.threadId = threadId; this.isQuestionTypeThread = isQuestionTypeThread; this.isFetchingEndorsed = isQuestionTypeThread; - discussionService = EntryPointAccessors - .fromApplication(context, EdxDefaultModule.ProviderEntryPoint.class) - .getDiscussionService(); - config = EntryPointAccessors - .fromApplication(context, EdxDefaultModule.ProviderEntryPoint.class) - .getEnvironment().getConfig(); + EdxDefaultModule.ProviderEntryPoint entryPointProvider = EntryPointAccessors + .fromApplication(context, EdxDefaultModule.ProviderEntryPoint.class); + discussionService = entryPointProvider.getDiscussionService(); + config = entryPointProvider.getEnvironment().getConfig(); } @Override