| 29 | } |
| 30 | |
| 31 | pub(crate) fn get_timestamp(&self, index: usize) -> Option<i64> { |
| 32 | match self { |
| 33 | Self::MsgIds(_) => None, |
| 34 | Self::ContactIds(_) => None, |
| 35 | Self::Chat(array) => array.get(index).and_then(|item| match item { |
| 36 | ChatItem::Message { .. } => None, |
| 37 | ChatItem::DayMarker { timestamp } => Some(*timestamp), |
| 38 | }), |
| 39 | Self::Locations(array) => array.get(index).map(|location| location.timestamp), |
| 40 | Self::Uint(_) => None, |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | pub(crate) fn get_marker(&self, index: usize) -> Option<&str> { |
| 45 | match self { |