-
Notifications
You must be signed in to change notification settings - Fork 527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change profile id defaulting to invalid profile #5482
Changes from 7 commits
a5b67a0
51736af
e4746b1
fa10c46
e2e8590
47d63cf
9e8604e
14ecbee
190fbee
86d9d81
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,7 @@ class ClassroomListActivity : | |
@Inject | ||
lateinit var activityRouter: ActivityRouter | ||
|
||
private var internalProfileId: Int = -1 | ||
private lateinit var internalProfileId: ProfileId | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Variable name should not be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
|
||
companion object { | ||
/** Returns a new [Intent] to route to [ClassroomListActivity] for a specified [profileId]. */ | ||
|
@@ -58,7 +58,7 @@ class ClassroomListActivity : | |
super.onCreate(savedInstanceState) | ||
(activityComponent as ActivityComponentImpl).inject(this) | ||
|
||
internalProfileId = intent.extractCurrentUserProfileId().internalId | ||
internalProfileId = intent.extractCurrentUserProfileId() | ||
classroomListActivityPresenter.handleOnCreate() | ||
title = resourceHandler.getStringInLocale(R.string.classroom_list_activity_title) | ||
} | ||
|
@@ -88,7 +88,10 @@ class ClassroomListActivity : | |
val recentlyPlayedActivityParams = | ||
RecentlyPlayedActivityParams | ||
.newBuilder() | ||
.setProfileId(ProfileId.newBuilder().setInternalId(internalProfileId).build()) | ||
.setProfileId( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not just directly add the profileId object from above? This is redundant. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
ProfileId.newBuilder() | ||
.setLoggedInInternalProfileId(internalProfileId.loggedInInternalProfileId).build() | ||
) | ||
.setActivityTitle(recentlyPlayedActivityTitle).build() | ||
|
||
activityRouter.routeToScreen( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, Thanks! I missed