Skip to content

Commit 7bf3c6a

Browse files
Release Student 7.10.1 (274)
2 parents d9ff2c7 + 7bc5f69 commit 7bf3c6a

File tree

3 files changed

+25
-26
lines changed

3 files changed

+25
-26
lines changed

apps/student/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ android {
3939
applicationId "com.instructure.candroid"
4040
minSdkVersion Versions.MIN_SDK
4141
targetSdkVersion Versions.TARGET_SDK
42-
versionCode = 273
43-
versionName = '7.10.0'
42+
versionCode = 274
43+
versionName = '7.10.1'
4444

4545
vectorDrawables.useSupportLibrary = true
4646
testInstrumentationRunner 'com.instructure.student.espresso.StudentHiltTestRunner'

libs/pandautils/src/main/java/com/instructure/pandautils/base/PageViewFragmentDelegate.kt

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,15 @@ class PageViewFragmentDelegate<T>(
3333

3434
private val visibilityTracker = PageViewVisibilityTracker()
3535
private val pageViewAnnotationProcessor by lazy {
36-
val pageViewUtils = EarlyEntryPoints.get(
37-
fragment.requireActivity().applicationContext,
38-
PageViewEntryPoint::class.java
39-
).pageViewUtils()
40-
PageViewAnnotationProcessor(fragment::class.java, fragment, pageViewUtils)
36+
fragment.activity?.applicationContext?.let {
37+
val pageViewUtils = EarlyEntryPoints.get(it, PageViewEntryPoint::class.java).pageViewUtils()
38+
PageViewAnnotationProcessor(fragment::class.java, fragment, pageViewUtils)
39+
}
4140
}
4241

4342
fun completePageViewPrerequisite(prerequisite: String) {
4443
if (visibilityTracker.trackCustom(prerequisite, true, fragment)) {
45-
pageViewAnnotationProcessor.startEvent()
44+
pageViewAnnotationProcessor?.startEvent()
4645
}
4746
}
4847

@@ -63,39 +62,39 @@ class PageViewFragmentDelegate<T>(
6362

6463
fun onHiddenChanged(hidden: Boolean) {
6564
if (visibilityTracker.trackHidden(hidden, fragment)) {
66-
pageViewAnnotationProcessor.startEvent()
65+
pageViewAnnotationProcessor?.startEvent()
6766
} else {
68-
pageViewAnnotationProcessor.stopEvent()
67+
pageViewAnnotationProcessor?.stopEvent()
6968
}
7069
}
7170

7271
@Deprecated("See description in superclass")
7372
fun setUserVisibleHint(isVisibleToUser: Boolean) {
7473
if (fragment.isAdded) {
7574
if (visibilityTracker.trackUserHint(isVisibleToUser, fragment)) {
76-
pageViewAnnotationProcessor.startEvent()
75+
pageViewAnnotationProcessor?.startEvent()
7776
} else {
78-
pageViewAnnotationProcessor.stopEvent()
77+
pageViewAnnotationProcessor?.stopEvent()
7978
}
8079
}
8180
}
8281

8382
fun onResume() {
8483
if (visibilityTracker.trackResume(true, fragment)) {
85-
pageViewAnnotationProcessor.startEvent()
84+
pageViewAnnotationProcessor?.startEvent()
8685
}
8786
}
8887

8988
fun onPause() {
9089
visibilityTracker.trackResume(false, fragment)
91-
pageViewAnnotationProcessor.stopEvent()
90+
pageViewAnnotationProcessor?.stopEvent()
9291
}
9392

9493
fun onPageViewWindowFocusChanged(hasFocus: Boolean) {
9594
if (visibilityTracker.trackCustom("windowFocus", hasFocus, fragment)) {
96-
pageViewAnnotationProcessor.startEvent()
95+
pageViewAnnotationProcessor?.startEvent()
9796
} else {
98-
pageViewAnnotationProcessor.stopEvent()
97+
pageViewAnnotationProcessor?.stopEvent()
9998
}
10099
}
101-
}
100+
}

libs/pandautils/src/main/java/com/instructure/pandautils/features/calendar/composables/CalendarScreen.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,6 @@ fun CalendarScreen(
101101
}
102102
}
103103
}
104-
val todayTapped = calendarScreenUiState.calendarUiState.todayTapped
105-
LaunchedEffect(todayTapped) {
106-
if (todayTapped) {
107-
focusManager.clearFocus(true)
108-
delay(200)
109-
todayFocusRequester.requestFocus()
110-
actionHandler(CalendarAction.TodayTapHandled)
111-
}
112-
}
113104
Scaffold(
114105
backgroundColor = colorResource(id = R.color.backgroundLightest),
115106
topBar = {
@@ -170,6 +161,15 @@ fun CalendarScreen(
170161
Calendar(calendarScreenUiState.calendarUiState, actionHandler, Modifier.fillMaxWidth(), todayFocusRequester)
171162
CalendarEvents(calendarScreenUiState.calendarEventsUiState, actionHandler, Modifier.testTag("calendarEvents"))
172163
}
164+
val todayTapped = calendarScreenUiState.calendarUiState.todayTapped
165+
LaunchedEffect(todayTapped) {
166+
if (todayTapped) {
167+
focusManager.clearFocus(true)
168+
delay(200)
169+
todayFocusRequester.requestFocus()
170+
actionHandler(CalendarAction.TodayTapHandled)
171+
}
172+
}
173173
}
174174
},
175175
floatingActionButton = {

0 commit comments

Comments
 (0)