forked from oppia/oppia-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor admin control to use profile (oppia#5619)
<!-- READ ME FIRST: Please fill in the explanation section below and check off every point from the Essential Checklist! --> ## Explanation ### Fixes part of oppia#4865 This PR aim to refactor `administratorcontrols` package to use ProfileId Changes include `AdministratorControlsActivity`, Fragment and Presenters Also updated the test classes. ## Essential Checklist <!-- Please tick the relevant boxes by putting an "x" in them. --> - [x] The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".) - [x] Any changes to [scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets) files have their rationale included in the PR explanation. - [x] The PR follows the [style guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide). - [x] The PR does not contain any unnecessary code changes from Android Studio ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)). - [x] The PR is made from a branch that's **not** called "develop" and is up-to-date with "develop". - [x] The PR is **assigned** to the appropriate reviewers ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)). --------- Co-authored-by: Adhiambo Peres <59600948+adhiamboperes@users.noreply.github.com>
- Loading branch information
1 parent
4f58be9
commit 7b80e62
Showing
8 changed files
with
25 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
app/src/main/java/org/oppia/android/app/administratorcontrols/LoadProfileEditListener.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
package org.oppia.android.app.administratorcontrols | ||
|
||
import org.oppia.android.app.model.ProfileId | ||
|
||
/** Listener for when an activity should load [ProfileEditFragment]. */ | ||
interface LoadProfileEditListener { | ||
/** Inflates [ProfileEditFragment] as part of a tablet mode a multipane fragment. */ | ||
fun loadProfileEdit(profileId: Int, profileName: String) | ||
fun loadProfileEdit(profileId: ProfileId, profileName: String) | ||
} |
4 changes: 3 additions & 1 deletion
4
...main/java/org/oppia/android/app/settings/profile/LoadProfileEditDeletionDialogListener.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
package org.oppia.android.app.settings.profile | ||
|
||
import org.oppia.android.app.model.ProfileId | ||
|
||
/** Listener for when the activity should inflate [ProfileEditDeletionDialogFragment]. */ | ||
interface LoadProfileEditDeletionDialogListener { | ||
/** | ||
* Inflates [ProfileEditDeletionDialogFragment] for the configuration changes, i.e. rotating the device | ||
* from landscape to portrait, and saves the state of the dialog. | ||
*/ | ||
fun loadProfileEditDeletionDialog(internalProfileId: Int) | ||
fun loadProfileEditDeletionDialog(profileId: ProfileId) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters