diff --git a/WordPress/src/main/java/org/wordpress/android/ui/stats/refresh/StatsViewModel.kt b/WordPress/src/main/java/org/wordpress/android/ui/stats/refresh/StatsViewModel.kt index b4489367b2f4..4c4fa6cfd0b3 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/stats/refresh/StatsViewModel.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/stats/refresh/StatsViewModel.kt @@ -140,20 +140,7 @@ class StatsViewModel } private fun getInitialTimeFrame(intent: Intent): StatsSection? { - val timeframe = intent.getSerializableExtraCompat(StatsActivity.ARG_DESIRED_TIMEFRAME) - if (statsTrafficTabFeatureConfig.isEnabled()) { - if (timeframe == DAY || timeframe == WEEK || timeframe == MONTH || timeframe == YEAR) { - when (timeframe) { - DAY -> selectedTrafficGranularityManager.setSelectedTrafficGranularity(StatsGranularity.DAYS) - WEEK -> selectedTrafficGranularityManager.setSelectedTrafficGranularity(StatsGranularity.WEEKS) - MONTH -> selectedTrafficGranularityManager.setSelectedTrafficGranularity(StatsGranularity.MONTHS) - YEAR -> selectedTrafficGranularityManager.setSelectedTrafficGranularity(StatsGranularity.YEARS) - else -> { /* Do nothing */} - } - } - } - - return when (timeframe) { + return when (intent.getSerializableExtraCompat(StatsActivity.ARG_DESIRED_TIMEFRAME)) { StatsTimeframe.INSIGHTS -> StatsSection.INSIGHTS DAY -> StatsSection.DAYS WEEK -> StatsSection.WEEKS