fix redirects processed update

This commit is contained in:
yggverse 2024-12-10 00:49:46 +02:00
parent ae5399e68e
commit e27f977bcd
3 changed files with 22 additions and 36 deletions

View file

@ -1,32 +1,10 @@
use gtk::glib::GString;
use std::cell::Cell;
/// # Redirection data holder
///
/// This component does nothing,
/// but useful as the container for temporary redirection data
/// operated by external controller
///
/// ## Members
///
/// * `is_foreground` - indicates how to process this redirect
/// * `request` - destination
/// * currently, it's raw `GString` not [Uri](https://docs.gtk.org/glib/struct.Uri.html)
/// because of compatibility with request field as it could contain any other, not parsable values
#[derive(Clone, Debug)]
pub struct Redirect {
pub is_foreground: bool,
pub is_processed: Cell<bool>,
pub referrer: Option<GString>,
pub request: GString,
}
impl Redirect {
// Constructors
pub fn new(request: GString, referrer: Option<GString>, is_foreground: bool) -> Self {
Self {
is_foreground,
referrer,
request,
}
}
}