Skip to content

Commit

Permalink
Release Student 6.21.1 (245)
Browse files Browse the repository at this point in the history
  • Loading branch information
tamaskozmer authored Dec 9, 2022
2 parents 0be501f + 212d5a4 commit 5a462b7
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 15 deletions.
4 changes: 2 additions & 2 deletions apps/student/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ android {
applicationId "com.instructure.candroid"
minSdkVersion Versions.MIN_SDK
targetSdkVersion Versions.TARGET_SDK
versionCode = 244
versionName = '6.21.0'
versionCode = 245
versionName = '6.21.1'

vectorDrawables.useSupportLibrary = true
multiDexEnabled = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package com.instructure.student.ui.renderTests

import android.os.Build
import com.instructure.canvas.espresso.Stub
import com.instructure.student.espresso.StudentRenderTest
import com.instructure.student.mobius.assignmentDetails.submissionDetails.content.TextSubmissionViewFragment
import com.instructure.student.ui.pages.renderPages.TextSubmissionViewRenderPage
Expand All @@ -27,6 +28,7 @@ class TextSubmissionViewRenderTest : StudentRenderTest() {

private val page = TextSubmissionViewRenderPage()

@Stub
@Test
fun displaysProgressBarPriorToLoading() {
loadPageWithHtml("Sample Text")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class AssignmentBasicFragment : ParentFragment() {
}

loadHtmlJob = assignmentWebViewWrapper.webView.loadHtmlWithIframes(requireContext(), description, {
assignmentWebViewWrapper.loadHtml(it, assignment.name)
assignmentWebViewWrapper?.loadHtml(it, assignment.name)
}, {
LtiLaunchFragment.routeLtiLaunchFragment(requireContext(), canvasContext, it)
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,12 @@ class AssignmentListFragment : ParentFragment(), Bookmarkable {
backgroundColor = requireContext().getColor(R.color.backgroundInfo)
}
}
if (filterPosition == 0) {
BadgeUtils.detachBadgeDrawable(badgeDrawable, toolbar, R.id.menu_filter_assignments)
} else {
BadgeUtils.attachBadgeDrawable(badgeDrawable!!, toolbar, R.id.menu_filter_assignments)
toolbar?.let {
if (filterPosition == 0) {
BadgeUtils.detachBadgeDrawable(badgeDrawable, it, R.id.menu_filter_assignments)
} else {
BadgeUtils.attachBadgeDrawable(badgeDrawable!!, it, R.id.menu_filter_assignments)
}
}
}, 100)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,9 @@ class CalendarEventFragment : ParentFragment() {
}

private fun loadCalendarHtml(html: String, contentDescription: String?) {
calendarEventWebViewWrapper.setVisible()
calendarEventWebViewWrapper.setBackgroundColor(ContextCompat.getColor(requireContext(), R.color.backgroundLightest))
calendarEventWebViewWrapper.loadHtml(html, contentDescription, baseUrl = scheduleItem?.htmlUrl)
calendarEventWebViewWrapper?.setVisible()
calendarEventWebViewWrapper?.setBackgroundColor(ContextCompat.getColor(requireContext(), R.color.backgroundLightest))
calendarEventWebViewWrapper?.loadHtml(html, contentDescription, baseUrl = scheduleItem?.htmlUrl)
}

private fun setUpCallback() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -716,16 +716,18 @@ class DiscussionDetailsFragment : ParentFragment(), Bookmarkable {
}

private fun loadHTMLTopic(html: String, contentDescription: String?) {
setupHeaderWebView()
discussionTopicHeaderWebViewWrapper.loadHtml(html, contentDescription, baseUrl = discussionTopicHeader.htmlUrl)
if (discussionTopicHeaderWebViewWrapper != null) {
setupHeaderWebView()
discussionTopicHeaderWebViewWrapper.loadHtml(html, contentDescription, baseUrl = discussionTopicHeader.htmlUrl)
}
}

private fun loadDiscussionTopicViews(html: String) {
discussionRepliesWebViewWrapper.setVisible()
discussionProgressBar.setGone()

loadHeaderHtmlJob = discussionRepliesWebViewWrapper.webView.loadHtmlWithIframes(requireContext(), html, {
discussionRepliesWebViewWrapper.loadDataWithBaseUrl(CanvasWebView.getReferrer(true), html, "text/html", "UTF-8", null)
discussionRepliesWebViewWrapper?.loadDataWithBaseUrl(CanvasWebView.getReferrer(true), html, "text/html", "UTF-8", null)
})

swipeRefreshLayout.isRefreshing = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ class PageDetailsFragment : InternalWebviewFragment(), Bookmarkable {

// Load the html with the helper function to handle iframe cases
loadHtmlJob = canvasWebViewWrapper.webView.loadHtmlWithIframes(requireContext(), body, {
canvasWebViewWrapper.loadHtml(it, page.title, baseUrl = page.htmlUrl)
canvasWebViewWrapper?.loadHtml(it, page.title, baseUrl = page.htmlUrl)
}) {
LtiLaunchFragment.routeLtiLaunchFragment(requireContext(), canvasContext, it)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ class AssignmentDetailsView(
}

private fun loadDescriptionHtml(html: String, contentDescription: String?, baseUrl: String?) {
descriptionWebViewWrapper.loadHtml(html, contentDescription, baseUrl = baseUrl)
descriptionWebViewWrapper?.loadHtml(html, contentDescription, baseUrl = baseUrl)
}

private fun renderQuizDetails(quizDescriptionViewState: QuizDescriptionViewState) {
Expand Down

0 comments on commit 5a462b7

Please sign in to comment.