-
Notifications
You must be signed in to change notification settings - Fork 108
[CLX-3438][Horizon] Notebook changes #3427
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
base: master
Are you sure you want to change the base?
Changes from 12 commits
e66845d
df0abb3
48ae3f2
215c891
142fab6
f7a7205
f676ccd
c1a142e
13366b1
088594e
54ab8c3
e045726
3177b70
1c2e97d
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 |
|---|---|---|
|
|
@@ -27,11 +27,13 @@ import com.instructure.canvasapi2.utils.weave.catch | |
| import com.instructure.canvasapi2.utils.weave.tryLaunch | ||
| import com.instructure.horizon.R | ||
| import com.instructure.horizon.features.notebook.addedit.AddEditViewModel | ||
| import com.instructure.horizon.features.notebook.common.composable.toNotebookLocalisedDateFormat | ||
| import com.instructure.horizon.features.notebook.common.model.NotebookType | ||
| import com.instructure.horizon.features.notebook.navigation.NotebookRoute | ||
| import dagger.hilt.android.lifecycle.HiltViewModel | ||
| import dagger.hilt.android.qualifiers.ApplicationContext | ||
| import kotlinx.coroutines.flow.update | ||
| import java.util.Date | ||
| import javax.inject.Inject | ||
|
|
||
| @HiltViewModel | ||
|
|
@@ -57,6 +59,7 @@ class AddNoteViewModel @Inject constructor( | |
| it.copy( | ||
| title = context.getString(R.string.createNoteTitle), | ||
| hasContentChange = true, | ||
| lastModifiedDate = Date().toNotebookLocalisedDateFormat(), | ||
|
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. Creating a new |
||
| highlightedData = NoteHighlightedData( | ||
| selectedText = highlightedText, | ||
| range = NoteHighlightedDataRange( | ||
|
|
||
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.
The
onNoteAddedcallback now callsuiState.addNote()instead of navigating directly. This is good architectural change, but ensure that:addNotefunction properly handles all the navigation and state managementCould you verify that
uiState.addNoteis implemented and handles these cases?