|
|
|
@ -4,6 +4,7 @@
|
|
|
|
|
|
|
|
|
|
package org.mozilla.fenix.settings.address.interactor
|
|
|
|
|
|
|
|
|
|
import mozilla.components.concept.storage.Address
|
|
|
|
|
import mozilla.components.concept.storage.UpdatableAddressFields
|
|
|
|
|
import org.mozilla.fenix.settings.address.controller.AddressEditorController
|
|
|
|
|
|
|
|
|
@ -26,6 +27,14 @@ interface AddressEditorInteractor {
|
|
|
|
|
*/
|
|
|
|
|
fun onSaveAddress(addressFields: UpdatableAddressFields)
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Deletes the provided address from the autofill storage. Called when a user
|
|
|
|
|
* taps on the save menu item or "Save" button.
|
|
|
|
|
*
|
|
|
|
|
* @param guid The unique identifier for the [Address] record to delete.
|
|
|
|
|
*/
|
|
|
|
|
fun onDeleteAddress(guid: String)
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Updates the provided address in the autofill storage. Called when a user
|
|
|
|
|
* taps on the update menu item or "Update" button.
|
|
|
|
@ -53,6 +62,10 @@ class DefaultAddressEditorInteractor(
|
|
|
|
|
controller.handleSaveAddress(addressFields)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
override fun onDeleteAddress(guid: String) {
|
|
|
|
|
controller.handleDeleteAddress(guid)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
override fun onUpdateAddress(guid: String, addressFields: UpdatableAddressFields) {
|
|
|
|
|
controller.handleUpdateAddress(guid, addressFields)
|
|
|
|
|
}
|
|
|
|
|