Dual-Editor Split-Screen System - #63
Open
diekaiju wants to merge 2 commits into
Open
Conversation
…I and lifecycle management
…e note editing and PDF import
Author
Author
|
@shardulvs |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Feature: Dual-Editor Split-Screen Support
Description
This pull request implements a fully functional split-screen feature allowing users to open, view, and edit two notes/PDFs side-by-side.
Rather than rendering a static, read-only PDF viewer in the split pane, this implementation runs two isolated and fully featured instances of the standard note editor (
editorLeftandeditorRight). When the split screen is enabled, the secondary pane displays the in-app explorer list, allowing the user to select and edit any existing note.Key Technical Details
Editorclass constructor to accept aninstanceName(e.g."left"/"right"). This isolates all active session stores and temporary directories (pdfsrc,noteimg,savetmp,session) on disk, preventing thread/file collisions.MainActivityto concurrently initialize, restore, and persist both editor sessions throughout the activity lifecycle (onCreate,onPause,onDestroy).Rowsplits with a vertical hairline divider, rendering self-contained toolbars and format bars within each pane.Changed Files & Line Analysis
1.
app/src/main/java/com/xnotes/ui/Editor.ktEditorclass constructor withinstanceNameand updated directories (pdfDir,imageDir,saveTmpDir) to append_$instanceName.SessionStoredirectory path usinginstanceName.toggleSplitScreenandcloseSplitScreenlifecycle controls.2.
app/src/main/java/com/xnotes/MainActivity.ktdetectTapGestures,pointerInput).editorLeftandeditorRight.onCreate'ssetContentto instantiate both editors, load sessions concurrently, and bind listeners to the active editor.onPauseandonDestroylifecycles to persist and release resources for both editor instances.EditorScreenComposable parameters to accept left, right, and active editor states.3.
app/src/main/java/com/xnotes/ui/Popups.kt