api!: remove getPushState() and core's internal tracking of it.

Since https://github.com/deltachat/deltachat-ios/pull/3224 pushstate is not used
(android, desktop etc. never used it, only ios)
This commit is contained in:
holger krekel
2026-07-30 17:32:54 +02:00
parent 0bb3d88bc6
commit 35555ca753
10 changed files with 0 additions and 98 deletions
-25
View File
@@ -7,14 +7,12 @@
//! which holds push notification token for the device,
//! shared by all accounts.
use std::sync::Arc;
use std::sync::atomic::Ordering;
use anyhow::{Context as _, Result};
use base64::Engine as _;
use pgp::crypto::aead::{AeadAlgorithm, ChunkSize};
use pgp::crypto::sym::SymmetricKeyAlgorithm;
use crate::context::Context;
use crate::key::DcKey;
/// Manages subscription to Apple Push Notification services.
@@ -117,29 +115,6 @@ impl PushSubscriber {
}
}
/// Push notification state
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, FromPrimitive, ToPrimitive)]
#[repr(i8)]
pub enum NotifyState {
/// Not subscribed to push notifications.
#[default]
NotConnected = 0,
/// Subscribed to push notifications for new messages.
Connected = 2,
}
impl Context {
/// Returns push notification subscriber state.
pub fn push_state(&self) -> NotifyState {
if self.push_subscribed.load(Ordering::Relaxed) {
NotifyState::Connected
} else {
NotifyState::NotConnected
}
}
}
#[cfg(test)]
mod tests {
use super::*;