You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
1012 B
Kotlin
28 lines
1012 B
Kotlin
3 years ago
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||
|
|
||
3 years ago
|
package org.mozilla.fenix.home.pocket
|
||
3 years ago
|
|
||
|
import mozilla.components.service.pocket.PocketRecommendedStory
|
||
|
|
||
|
/**
|
||
|
* Category name of the default category from which stories are to be shown
|
||
|
* if user hasn't explicitly selected others.
|
||
|
*/
|
||
|
const val POCKET_STORIES_DEFAULT_CATEGORY_NAME = "general"
|
||
|
|
||
|
/**
|
||
3 years ago
|
* In memory cache of Pocket assigned topic of interest for recommended stories.
|
||
|
* Avoids multiple stories mappings for each time we are interested in their categories.
|
||
3 years ago
|
*
|
||
|
* One to many relationship with [PocketRecommendedStory]es.
|
||
|
*
|
||
|
* @property name The exact name of each category. Case sensitive.
|
||
3 years ago
|
* @property stories All [PocketRecommendedStory]s with this category.
|
||
3 years ago
|
*/
|
||
3 years ago
|
data class PocketRecommendedStoriesCategory(
|
||
3 years ago
|
val name: String,
|
||
3 years ago
|
val stories: List<PocketRecommendedStory> = emptyList()
|
||
3 years ago
|
)
|