rename identity type from default to common

This commit is contained in:
yggverse 2025-01-29 19:28:42 +02:00
parent 873e642b10
commit a6d84908cc
23 changed files with 8 additions and 8 deletions

View file

@ -247,7 +247,7 @@ impl Request for Entry {
fn identity(&self, profile: &Rc<Profile>) {
if let Some(uri) = self.uri() {
if ["gemini", "titan"].contains(&uri.scheme().as_str()) {
return identity::default(
return identity::common(
profile,
&uri,
&Rc::new({

View file

@ -1,8 +1,8 @@
mod default;
mod common;
mod unsupported;
use adw::AlertDialog;
use default::Default;
use common::Common;
use unsupported::Unsupported;
use super::Profile;
@ -10,12 +10,12 @@ use gtk::glib::Uri;
use std::rc::Rc;
/// Create new identity widget for Gemini protocol match given URI
pub fn default(
pub fn common(
profile: &Rc<Profile>,
request: &Uri,
callback: &Rc<impl Fn(bool) + 'static>,
) -> Default {
Default::build(profile, request, callback)
) -> Common {
Common::build(profile, request, callback)
}
/// Create new identity widget for unknown request

View file

@ -5,12 +5,12 @@ use super::Profile;
use gtk::{glib::Uri, prelude::IsA};
use std::rc::Rc;
pub struct Default {
pub struct Common {
// profile: Rc<Profile>,
widget: Rc<Widget>,
}
impl Default {
impl Common {
// Construct
/// Create new `Self` for given `Profile`