/// Writes the intl info to persistent storage and updates our local copy.
///
/// TODO(fxb/41639): inline this method into set_time_zone
Writes the intl info to persistent storage and updates our local copy.
TODO(fxb/41639): inline this method into set_time_zone
Writes the intl info to persistent storage and updates our local copy . TODO ( fxb / 41639 ) : inline this method into set_time_zone
fn write_intl_info_to_local_storage(
        &mut self,
        info: IntlInfo,
        responder: SettingRequestResponder,
    ) {
        let old_value = self.stored_value.clone();
        self.stored_value = info.merge(self.stored_value.clone());
        if old_value == self.stored_value {
            // Value unchanged, no need to persist or notify listeners.
            responder.send(Ok(None)).ok();
            return;
        }
        // Attempt to persist the value.
        self.persist_intl_info(self.stored_value.clone(), responder);
        // Notify listeners of value change.
        if let Some(notifier) = (*self.listen_notifier.read()).clone() {
            let _ = notifier.unbounded_send(SettingType::Intl);
        }
    }
fn write_intl_info_to_local_storage ( & mut self , info : IntlInfo , responder : SettingRequestResponder , ) { let old_value = self . stored_value . clone ( ) ; self . stored_value = info . merge ( self . stored_value . clone ( ) ) ; if old_value == self . stored_value { // Value unchanged, no need to persist or notify listeners. responder . send ( Ok ( None ) ) . ok ( ) ; return ; } // Attempt to persist the value. self . persist_intl_info ( self . stored_value . clone ( ) , responder ) ; // Notify listeners of value change. if let Some ( notifier ) = ( * self . listen_notifier . read ( ) ) . clone ( ) { let _ = notifier . unbounded_send ( SettingType :: Intl ) ; } }
Writes the intl info to persistent storage and updates our local copy.
Writes the intl info to persistent storage and updates our local copy .
&mut self
info
IntlInfo
responder
SettingRequestResponder