diff --git a/WordPress/Classes/ViewRelated/Me/App Settings/AppSettingsViewController.swift b/WordPress/Classes/ViewRelated/Me/App Settings/AppSettingsViewController.swift index 9c06246cceb1..4a5df4179fe2 100644 --- a/WordPress/Classes/ViewRelated/Me/App Settings/AppSettingsViewController.swift +++ b/WordPress/Classes/ViewRelated/Me/App Settings/AppSettingsViewController.swift @@ -148,13 +148,20 @@ class AppSettingsViewController: UITableViewController { MediaSettings().maxImageSizeSetting = value ShareExtensionService.configureShareExtensionMaximumMediaDimension(value) - var properties = [String: AnyObject]() - properties["enabled"] = (value != Int.max) as AnyObject - properties["value"] = value as Int as AnyObject - WPAnalytics.track(.appSettingsImageOptimizationChanged, withProperties: properties) + self.debounce(#selector(self.trackImageSizeChanged), afterDelay: 0.5) } } + @objc func trackImageSizeChanged() { + let value = MediaSettings().maxImageSizeSetting + + var properties = [String: AnyObject]() + properties["enabled"] = (value != Int.max) as AnyObject + properties["value"] = value as Int as AnyObject + + WPAnalytics.track(.appSettingsImageOptimizationChanged, withProperties: properties) + } + func pushVideoResolutionSettings() -> ImmuTableAction { return { [weak self] row in let values = [MediaSettings.VideoResolution.size640x480,