Get a forked title
(&self)
| 392 | |
| 393 | /// Get a forked title |
| 394 | pub fn get_forked_title(&self) -> String { |
| 395 | // Simple implementation without regex dependency |
| 396 | if self.title.ends_with(")") && self.title.contains(" (fork #") { |
| 397 | if let Some(pos) = self.title.rfind(" (fork #") { |
| 398 | let base = &self.title[..pos]; |
| 399 | let num_part = &self.title[pos + 8..self.title.len() - 1]; |
| 400 | if let Ok(num) = num_part.parse::<u32>() { |
| 401 | return format!("{} (fork #{})", base, num + 1); |
| 402 | } |
| 403 | } |
| 404 | } |
| 405 | format!("{} (fork #1)", self.title) |
| 406 | } |
| 407 | |
| 408 | /// Touch the session (update timestamp) |
| 409 | pub fn touch(&mut self) { |