diff options
| author | 魏曹先生 <1992414357@qq.com> | 2025-11-05 16:45:13 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2025-11-05 16:46:22 +0800 |
| commit | f34fd7e803f0e52f526b7a56c09fdb262ed9b8aa (patch) | |
| tree | 5e6df4b73fc2721a9b23e43a94d5051e4f4f535d /crates/vcs_data/src/data/sheet.rs | |
| parent | 8b3b92b405ebc96416ec300ad3f6260bd8354864 (diff) | |
Update draft folder structure to include account name
The draft folder path now includes the account name to prevent conflicts
when multiple accounts work on the same sheet. This requires updating
the draft_folder method signature and all call sites.
Additionally, account switching is now restricted when a sheet is in use
to maintain data integrity.
Diffstat (limited to 'crates/vcs_data/src/data/sheet.rs')
| -rw-r--r-- | crates/vcs_data/src/data/sheet.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crates/vcs_data/src/data/sheet.rs b/crates/vcs_data/src/data/sheet.rs index ce450a6..69dc27d 100644 --- a/crates/vcs_data/src/data/sheet.rs +++ b/crates/vcs_data/src/data/sheet.rs @@ -89,6 +89,16 @@ impl<'a> Sheet<'a> { &self.data.mapping } + /// Forget the holder of this sheet + pub fn forget_holder(&mut self) { + self.data.holder = None; + } + + /// Set the holder of this sheet + pub fn set_holder(&mut self, holder: MemberId) { + self.data.holder = Some(holder); + } + /// Add an input package to the sheet pub fn add_input(&mut self, input_package: InputPackage) -> Result<(), std::io::Error> { if self.data.inputs.iter().any(|input| input == &input_package) { |
