app / de.uniks.codliners.stock_simulator.ui.news / NewsViewModel

NewsViewModel

class NewsViewModel : ViewModel

The NewsFragment's viewmodel.

Types

Factory

The NewsViewModel's factory class.

class Factory : Factory

Constructors

<init>

The NewsFragment's viewmodel.

NewsViewModel(application: Application, symbol: String)

Properties

errorAction

Gets triggered if an error has been occurred.

val errorAction: LiveData<Exception>

news

The news to show.

val news: LiveData<List<News>>

refreshing

Indicates whether news are being fetched.

val refreshing: LiveData<Boolean>

Functions

onErrorActionCompleted

Resets the error indicator.

fun onErrorActionCompleted(): Unit

refresh

Fetch news.

fun refresh(): Unit