Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove image optimization pop-up #20034

Closed
wants to merge 52 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
aba8671
[Bug] Made updates related to targetSdk update for media.
Jan 18, 2024
ad68d28
Add spinner labels for stats granularity
irfano Jan 19, 2024
017c535
Update `stats_date_selector.xml` by adding spinner
irfano Jan 19, 2024
6fe46fa
Initialize stats granularity spinner from the fragment
irfano Jan 19, 2024
3945f06
Hide timezone when stats_traffic_tab enabled
irfano Jan 21, 2024
4f18ae5
Fix `StatsDateSelectorTest` by adding `stats_traffic_tab` flag
irfano Jan 21, 2024
4ddc0d9
Add `isGranularitySpinnerVisible` parameter to `DateSelectorUiModel`
irfano Jan 21, 2024
c9a48b1
Move logic of granularity spinner visibility to `DateSelectorViewUtils`
irfano Jan 21, 2024
b5155f4
Add `TrafficListViewModel` to fix the visibility logic of spinner
irfano Jan 22, 2024
0886b49
Fix initializing view model for Annual stats section
irfano Jan 22, 2024
ff2c295
chore: remove *.aab file from repository
wzieba Jan 22, 2024
64ae4a9
chore: add *.aab to .gitignore
wzieba Jan 22, 2024
402e090
Merge pull request #19995 from wordpress-mobile/release/24.1
oguzkocer Jan 22, 2024
9db2e21
Merge pull request #19994 from wordpress-mobile/remove_jetpack_aab_file
aditi-bhatia Jan 22, 2024
2c6da28
Merge pull request #19982 from wordpress-mobile/issue/19952-add-stats…
ravishanker Jan 22, 2024
a1e0fb9
Merge branch 'trunk' into fix/target-sdk-14-image-bug-fixes
Jan 23, 2024
ff72121
Merge pull request #20007 from wordpress-mobile/release/24.1
oguzkocer Jan 23, 2024
943c886
Merge pull request #19979 from wordpress-mobile/fix/target-sdk-14-ima…
irfano Jan 24, 2024
3ba9ad8
Merge pull request #20019 from wordpress-mobile/release/24.1
oguzkocer Jan 24, 2024
12090a1
feat: Remove pop-up for in-editor photo selection
Jan 25, 2024
51ee2b0
feat: Remove pop-up for Story posts
Jan 25, 2024
ddd3871
feat: Remove pop-up for uploads in media screen
Jan 25, 2024
8a439a7
refactor: Delete unused logic for displaying promo
Jan 25, 2024
da66b1d
refactor: Remove tracking for deleted code
Jan 25, 2024
ecf4bad
refactor: Delete unused code after pop-up removal
Jan 25, 2024
1bc14e4
refactor: Delete redundant test
Jan 25, 2024
3b8a8cb
refactor: Remove unused imports and vars
Jan 25, 2024
538127b
refactor: Remove unused imports
Jan 25, 2024
70a9af0
refactor: Tidy up functions with little logic
Jan 25, 2024
9165da3
chore: remove *.aab file from repository
wzieba Jan 22, 2024
d3aed39
chore: add *.aab to .gitignore
wzieba Jan 22, 2024
b54feb2
Add spinner labels for stats granularity
irfano Jan 19, 2024
1e77b19
Update `stats_date_selector.xml` by adding spinner
irfano Jan 19, 2024
8b94302
Initialize stats granularity spinner from the fragment
irfano Jan 19, 2024
01369aa
Hide timezone when stats_traffic_tab enabled
irfano Jan 21, 2024
5f79a45
Fix `StatsDateSelectorTest` by adding `stats_traffic_tab` flag
irfano Jan 21, 2024
cc06406
Add `isGranularitySpinnerVisible` parameter to `DateSelectorUiModel`
irfano Jan 21, 2024
e275fa7
Move logic of granularity spinner visibility to `DateSelectorViewUtils`
irfano Jan 21, 2024
ee6462d
Add `TrafficListViewModel` to fix the visibility logic of spinner
irfano Jan 22, 2024
04bee32
Fix initializing view model for Annual stats section
irfano Jan 22, 2024
22531ec
[Bug] Made updates related to targetSdk update for media.
Jan 18, 2024
2284538
feat: Remove pop-up for in-editor photo selection
Jan 25, 2024
6dbd471
feat: Remove pop-up for Story posts
Jan 25, 2024
f8f2669
feat: Remove pop-up for uploads in media screen
Jan 25, 2024
59e39ce
refactor: Delete unused logic for displaying promo
Jan 25, 2024
a32307f
refactor: Remove tracking for deleted code
Jan 25, 2024
3014540
refactor: Delete unused code after pop-up removal
Jan 25, 2024
f0b08b3
refactor: Delete redundant test
Jan 25, 2024
dd8b8de
refactor: Remove unused imports and vars
Jan 25, 2024
e1e0c38
refactor: Remove unused imports
Jan 25, 2024
dacff85
refactor: Tidy up functions with little logic
Jan 25, 2024
f5ee0fe
Merge branch 'refactor/remove-image-optimization-pop-up' of github.co…
Jan 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# built application files
*.apk
*.ap_
*.aab

# files for the dex VM
*.dex
Expand Down
Binary file not shown.
7 changes: 5 additions & 2 deletions WordPress/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />

<!-- GCM all build types configuration -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
Expand Down Expand Up @@ -828,11 +829,13 @@
<!-- Services -->
<service
android:name=".ui.uploads.UploadService"
android:label="Upload Service" />
android:label="Upload Service"
android:foregroundServiceType="dataSync"/>
<service
android:name=".ui.media.services.MediaDeleteService"
android:label="Media Delete Service"
android:exported="false"
android:foregroundServiceType="dataSync"
/>

<service
Expand Down Expand Up @@ -1053,7 +1056,7 @@

<service
android:name=".push.GCMMessageService"
android:exported="false">
android:exported="false" >
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ class UserFlagsProviderHelper @Inject constructor(
DeletablePrefKey.RECENTLY_PICKED_SITE_IDS.name,
UndeletablePrefKey.THEME_IMAGE_SIZE_WIDTH.name,
UndeletablePrefKey.BOOKMARKS_SAVED_LOCALLY_DIALOG_SHOWN.name,
UndeletablePrefKey.IMAGE_OPTIMIZE_PROMO_REQUIRED.name,
UndeletablePrefKey.SWIPE_TO_NAVIGATE_NOTIFICATIONS.name,
UndeletablePrefKey.SWIPE_TO_NAVIGATE_READER.name,
UndeletablePrefKey.SHOULD_SHOW_STORIES_INTRO.name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
import org.wordpress.android.ui.stats.refresh.lists.TotalCommentsDetailListViewModel;
import org.wordpress.android.ui.stats.refresh.lists.TotalFollowersDetailListViewModel;
import org.wordpress.android.ui.stats.refresh.lists.TotalLikesDetailListViewModel;
import org.wordpress.android.ui.stats.refresh.lists.TrafficListViewModel;
import org.wordpress.android.ui.stats.refresh.lists.WeeksListViewModel;
import org.wordpress.android.ui.stats.refresh.lists.YearsListViewModel;
import org.wordpress.android.ui.stats.refresh.lists.detail.DetailListViewModel;
Expand Down Expand Up @@ -158,6 +159,11 @@ abstract class ViewModelModule {
@ViewModelKey(InsightsListViewModel.class)
abstract ViewModel insightsTabViewModel(InsightsListViewModel viewModel);

@Binds
@IntoMap
@ViewModelKey(TrafficListViewModel.class)
abstract ViewModel trafficTabViewModel(TrafficListViewModel viewModel);

@Binds
@IntoMap
@ViewModelKey(DaysListViewModel.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -508,24 +508,14 @@ public void onActivityResult(int requestCode, int resultCode, Intent data) {
case RequestCodes.PICTURE_LIBRARY:
case RequestCodes.VIDEO_LIBRARY:
case RequestCodes.AUDIO_LIBRARY:
handlePickerResult(data, resultCode);
break;
case RequestCodes.FILE_LIBRARY:
if (resultCode == Activity.RESULT_OK && data != null) {
if (WPMediaUtils.shouldAdvertiseImageOptimization(this)) {
WPMediaUtils.advertiseImageOptimization(this, () -> handlePickerResult(data, resultCode));
} else {
handlePickerResult(data, resultCode);
}
handlePickerResult(data, resultCode);
}
break;
case RequestCodes.TAKE_PHOTO:
if (resultCode == Activity.RESULT_OK) {
if (WPMediaUtils.shouldAdvertiseImageOptimization(this)) {
WPMediaUtils.advertiseImageOptimization(this, this::addLastTakenPicture);
} else {
addLastTakenPicture();
}
addLastTakenPicture();
}
break;
case RequestCodes.TAKE_VIDEO:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.Intent;
import android.content.IntentFilter;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Build;
import android.os.Build.VERSION_CODES;
import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
Expand Down Expand Up @@ -467,7 +469,15 @@ protected void onSaveInstanceState(@NonNull Bundle outState) {
@SuppressLint("UnspecifiedRegisterReceiverFlag")
public void onStart() {
super.onStart();
registerReceiver(mDownloadReceiver, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
if (Build.VERSION.SDK_INT >= VERSION_CODES.UPSIDE_DOWN_CAKE) {
registerReceiver(
mDownloadReceiver,
new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE),
ContextWrapper.RECEIVER_NOT_EXPORTED
);
} else {
registerReceiver(mDownloadReceiver, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
}
mDispatcher.register(this);

// we only register with EventBus the first time - necessary since we don't unregister in onStop()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class DeviceListBuilder(
// This item sets the threshold for the visible items in all the list
val lastShownTimestamp = results.fold(0L) { timestamp, (_, result) ->
val nextTimestamp = result?.nextTimestamp
if (nextTimestamp != null && nextTimestamp > timestamp) {
if (result?.items?.isNotEmpty() == true && nextTimestamp != null && nextTimestamp > timestamp) {
nextTimestamp
} else {
timestamp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,6 @@
import static org.wordpress.android.imageeditor.preview.PreviewImageFragment.PREVIEW_IMAGE_REDUCED_SIZE_FACTOR;
import static org.wordpress.android.ui.history.HistoryDetailContainerFragment.KEY_REVISION;

import kotlin.Unit;
import kotlin.jvm.functions.Function0;

public class EditPostActivity extends LocaleAwareActivity implements
EditorFragmentActivity,
EditorImageSettingsListener,
Expand Down Expand Up @@ -1309,7 +1306,7 @@ public void onPhotoPickerHidden() {
@Override
public void onPhotoPickerMediaChosen(@NonNull final List<? extends Uri> uriList) {
mEditorPhotoPicker.hidePhotoPicker();
mEditorMedia.onPhotoPickerMediaChosen(uriList);
mEditorMedia.addNewMediaItemsToEditorAsync(uriList, false);
}

/*
Expand Down Expand Up @@ -2842,12 +2839,6 @@ public void onActivityResult(int requestCode, int resultCode, Intent data) {
// handleMediaPickerResult -> addExistingMediaToEditorAndSave
break;
case RequestCodes.PHOTO_PICKER:
if (WPMediaUtils.shouldAdvertiseImageOptimization(this)) {
WPMediaUtils.advertiseImageOptimization(this, () -> handlePhotoPickerResult(data));
} else {
handlePhotoPickerResult(data);
}
break;
case RequestCodes.STOCK_MEDIA_PICKER_SINGLE_SELECT:
handlePhotoPickerResult(data);
break;
Expand All @@ -2861,18 +2852,12 @@ public void onActivityResult(int requestCode, int resultCode, Intent data) {
break;
case RequestCodes.MEDIA_LIBRARY:
case RequestCodes.PICTURE_LIBRARY:
mEditorMedia.advertiseImageOptimisationAndAddMedia(WPMediaUtils.retrieveMediaUris(data));
break;
case RequestCodes.TAKE_PHOTO:
if (WPMediaUtils.shouldAdvertiseImageOptimization(this)) {
WPMediaUtils.advertiseImageOptimization(this, this::addLastTakenPicture);
} else {
addLastTakenPicture();
}
break;
case RequestCodes.VIDEO_LIBRARY:
mEditorMedia.addNewMediaItemsToEditorAsync(WPMediaUtils.retrieveMediaUris(data), false);
break;
case RequestCodes.TAKE_PHOTO:
addLastTakenPicture();
break;
case RequestCodes.TAKE_VIDEO:
Uri videoUri = data.getData();
mEditorMedia.addNewMediaToEditorAsync(videoUri, true);
Expand Down Expand Up @@ -3940,10 +3925,6 @@ public void syncPostObjectWithUiAndSaveIt(@Nullable OnPostUpdatedFromUIListener
updateAndSavePostAsync(listener);
}

@Override public void advertiseImageOptimization(@NonNull Function0<Unit> listener) {
WPMediaUtils.advertiseImageOptimization(this, listener::invoke);
}

@Override
public void onMediaModelsCreatedFromOptimizedUris(@NonNull Map<Uri, ? extends MediaModel> oldUriToMediaModels) {
// no op - we're not doing any special handling on MediaModels in EditPostActivity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import org.wordpress.android.ui.posts.editor.media.EditorMedia.AddMediaToPostUiS
import org.wordpress.android.ui.posts.editor.media.EditorMedia.AddMediaToPostUiState.AddingSingleMedia
import org.wordpress.android.ui.uploads.UploadService
import org.wordpress.android.ui.utils.UiString.UiStringRes
import org.wordpress.android.util.MediaUtilsWrapper
import org.wordpress.android.util.NetworkUtilsWrapper
import org.wordpress.android.util.StringUtils
import org.wordpress.android.util.ToastUtils.Duration
Expand All @@ -52,7 +51,6 @@ class EditorMedia @Inject constructor(
private val updateMediaModelUseCase: UpdateMediaModelUseCase,
private val getMediaModelUseCase: GetMediaModelUseCase,
private val dispatcher: Dispatcher,
private val mediaUtilsWrapper: MediaUtilsWrapper,
private val networkUtilsWrapper: NetworkUtilsWrapper,
private val addLocalMediaToPostUseCase: AddLocalMediaToPostUseCase,
private val addExistingMediaToPostUseCase: AddExistingMediaToPostUseCase,
Expand Down Expand Up @@ -95,20 +93,6 @@ class EditorMedia @Inject constructor(
_uiState.value = AddingMediaIdle
}

// region Adding new media to a post
fun advertiseImageOptimisationAndAddMedia(uriList: List<Uri>) {
if (mediaUtilsWrapper.shouldAdvertiseImageOptimization()) {
editorMediaListener.advertiseImageOptimization {
addNewMediaItemsToEditorAsync(
uriList,
false
)
}
} else {
addNewMediaItemsToEditorAsync(uriList, false)
}
}

fun addNewMediaToEditorAsync(mediaUri: Uri, freshlyTaken: Boolean) {
addNewMediaItemsToEditorAsync(listOf(mediaUri), freshlyTaken)
}
Expand Down Expand Up @@ -145,15 +129,6 @@ class EditorMedia @Inject constructor(
)
}
}

fun onPhotoPickerMediaChosen(uriList: List<Uri>) {
val onlyVideos = uriList.all { mediaUtilsWrapper.isVideo(it.toString()) }
if (onlyVideos) {
addNewMediaItemsToEditorAsync(uriList, false)
} else {
advertiseImageOptimisationAndAddMedia(uriList)
}
}
// endregion

// region Add existing media to a post
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import org.wordpress.android.util.helpers.MediaFile
interface EditorMediaListener {
fun appendMediaFiles(mediaFiles: Map<String, MediaFile>)
fun syncPostObjectWithUiAndSaveIt(listener: OnPostUpdatedFromUIListener? = null)
fun advertiseImageOptimization(listener: () -> Unit)
fun onMediaModelsCreatedFromOptimizedUris(oldUriToMediaFiles: Map<Uri, MediaModel>)
fun getImmutablePost(): PostImmutableModel
fun showVideoDurationLimitWarning(fileName: String)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,6 @@ public enum UndeletablePrefKey implements PrefKey {

BOOKMARKS_SAVED_LOCALLY_DIALOG_SHOWN,

// When we need to show the new image optimize promo dialog
IMAGE_OPTIMIZE_PROMO_REQUIRED,

// When we need to show the snackbar indicating how notifications can be navigated through
SWIPE_TO_NAVIGATE_NOTIFICATIONS,

Expand Down Expand Up @@ -603,14 +600,6 @@ public static void setBookmarksSavedLocallyDialogShown() {
setBoolean(UndeletablePrefKey.BOOKMARKS_SAVED_LOCALLY_DIALOG_SHOWN, false);
}

public static boolean isImageOptimizePromoRequired() {
return getBoolean(UndeletablePrefKey.IMAGE_OPTIMIZE_PROMO_REQUIRED, true);
}

public static void setImageOptimizePromoRequired(boolean required) {
setBoolean(UndeletablePrefKey.IMAGE_OPTIMIZE_PROMO_REQUIRED, required);
}

/**
* This method should only be used by specific client classes that need access to the persisted selected site
* instance due to the fact that the in-memory selected site instance might not be yet available.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ class StatsViewModel

data class DateSelectorUiModel(
val isVisible: Boolean = false,
val isGranularitySpinnerVisible: Boolean = false,
val date: String? = null,
val timeZone: String? = null,
val enableSelectPrevious: Boolean = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import android.view.Menu
import android.view.MenuInflater
import android.view.MenuItem
import android.view.View
import android.widget.AdapterView
import android.widget.ArrayAdapter
import androidx.fragment.app.FragmentActivity
import androidx.lifecycle.ViewModelProvider
import androidx.recyclerview.widget.LinearLayoutManager
Expand All @@ -16,6 +18,7 @@ import androidx.recyclerview.widget.StaggeredGridLayoutManager
import dagger.hilt.android.AndroidEntryPoint
import org.wordpress.android.R
import org.wordpress.android.databinding.StatsListFragmentBinding
import org.wordpress.android.fluxc.network.utils.StatsGranularity
import org.wordpress.android.ui.ViewPagerFragment
import org.wordpress.android.ui.stats.refresh.StatsViewModel.DateSelectorUiModel
import org.wordpress.android.ui.stats.refresh.lists.StatsListViewModel.StatsSection
Expand All @@ -27,6 +30,8 @@ import org.wordpress.android.ui.stats.refresh.lists.detail.DetailListViewModel
import org.wordpress.android.ui.stats.refresh.utils.StatsDateFormatter
import org.wordpress.android.ui.stats.refresh.utils.StatsNavigator
import org.wordpress.android.ui.stats.refresh.utils.drawDateSelector
import org.wordpress.android.ui.stats.refresh.utils.toNameResource
import org.wordpress.android.util.config.StatsTrafficTabFeatureConfig
import org.wordpress.android.util.extensions.getParcelableCompat
import org.wordpress.android.util.extensions.getSerializableCompat
import org.wordpress.android.util.extensions.getSerializableExtraCompat
Expand All @@ -48,6 +53,10 @@ class StatsListFragment : ViewPagerFragment(R.layout.stats_list_fragment) {

@Inject
lateinit var navigator: StatsNavigator

@Inject
lateinit var statsTrafficTabFeatureConfig: StatsTrafficTabFeatureConfig

private lateinit var viewModel: StatsListViewModel
private lateinit var statsSection: StatsSection

Expand Down Expand Up @@ -142,6 +151,24 @@ class StatsListFragment : ViewPagerFragment(R.layout.stats_list_fragment) {
}
})

if (statsTrafficTabFeatureConfig.isEnabled()) {
dateSelector.granularitySpinner.adapter = ArrayAdapter(
requireContext(),
R.layout.filter_spinner_item,
StatsGranularity.entries.map { getString(it.toNameResource()) }
).apply { setDropDownViewResource(R.layout.toolbar_spinner_dropdown_item) }

dateSelector.granularitySpinner.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
// TODO update TRAFFIC tab
}

@Suppress("EmptyFunctionBlock")
override fun onNothingSelected(parent: AdapterView<*>?) {
}
}
}

dateSelector.nextDateButton.setOnClickListener {
viewModel.onNextDateSelected()
}
Expand Down Expand Up @@ -183,8 +210,8 @@ class StatsListFragment : ViewPagerFragment(R.layout.stats_list_fragment) {
StatsSection.TOTAL_LIKES_DETAIL -> TotalLikesDetailListViewModel::class.java
StatsSection.TOTAL_COMMENTS_DETAIL -> TotalCommentsDetailListViewModel::class.java
StatsSection.TOTAL_FOLLOWERS_DETAIL -> TotalFollowersDetailListViewModel::class.java
StatsSection.TRAFFIC -> TrafficListViewModel::class.java
StatsSection.ANNUAL_STATS,
StatsSection.TRAFFIC -> DaysListViewModel::class.java // Replace with TrafficListViewModel
StatsSection.INSIGHTS -> InsightsListViewModel::class.java
StatsSection.DAYS -> DaysListViewModel::class.java
StatsSection.WEEKS -> WeeksListViewModel::class.java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import org.wordpress.android.ui.stats.refresh.YEAR_STATS_USE_CASE
import org.wordpress.android.ui.stats.refresh.lists.StatsListViewModel.StatsSection.DAYS
import org.wordpress.android.ui.stats.refresh.lists.StatsListViewModel.StatsSection.INSIGHTS
import org.wordpress.android.ui.stats.refresh.lists.StatsListViewModel.StatsSection.MONTHS
import org.wordpress.android.ui.stats.refresh.lists.StatsListViewModel.StatsSection.TRAFFIC
import org.wordpress.android.ui.stats.refresh.lists.StatsListViewModel.StatsSection.WEEKS
import org.wordpress.android.ui.stats.refresh.lists.StatsListViewModel.StatsSection.YEARS
import org.wordpress.android.ui.stats.refresh.utils.ActionCardHandler
Expand Down Expand Up @@ -226,6 +227,13 @@ class DaysListViewModel @Inject constructor(
dateSelectorFactory: StatsDateSelector.Factory
) : StatsListViewModel(mainDispatcher, statsUseCase, analyticsTracker, dateSelectorFactory.build(DAYS))

class TrafficListViewModel @Inject constructor(
@Named(UI_THREAD) mainDispatcher: CoroutineDispatcher,
@Named(DAY_STATS_USE_CASE) statsUseCase: BaseListUseCase,
analyticsTracker: AnalyticsTrackerWrapper,
dateSelectorFactory: StatsDateSelector.Factory
) : StatsListViewModel(mainDispatcher, statsUseCase, analyticsTracker, dateSelectorFactory.build(TRAFFIC))

// Using Weeks granularity on new insight details screens
class InsightsDetailListViewModel @Inject constructor(
@Named(UI_THREAD) mainDispatcher: CoroutineDispatcher,
Expand Down
Loading
Loading