view model

 

   
class NewCommCreatePollViewModel @Inject constructor(
 private val cache: Cache,
private var repository: MessageChatsRepository,
private val unPinRepository: MessageV3ChatRepository,
private val createCommunityRepository : CommunityCreationRepository,
private val dashboardRepository: DashboardRepository
) : BaseViewModel() { } @HiltViewModel open class BaseViewModel @Inject constructor() : ViewModel() { }
@Singleton
class Cache @Inject internal constructor(){
var complimentsSelectedSubjectField: String = Constants.sEmptyString
var eNoticeList: ArrayList<GetAllNoticeResponse.GetAllNoticeResponseItem>? = null
}
class MessageChatsRepository @Inject constructor(
private val messageV3ApiEndPoints: MessageV3ApiEndPoints,
private val chatsDao: ChatsDao
) : BaseRepository(){ }
open class BaseRepository {
val bgDispatcher: CoroutineDispatcher = Dispatchers.IO
}
interface MessageV3ApiEndPoints{
@GET(Constants.Api.GET_NOTIFICATION_DURATIONS)
suspend fun getNotificationDurations(): Result<GetNotificationDurationsResponse> }

Rajeshbhatt12

My name is Rajesh Bhatt. I am working as a senior android developer . I have created this blog for kotlin ,java and Android Development interview questions etc..

Previous Post Next Post