Compose migration from beta-07 to 1.0
This commit is contained in:
		
							parent
							
								
									d86cbe75dd
								
							
						
					
					
						commit
						a559a24fa4
					
				
					 4 changed files with 24 additions and 24 deletions
				
			
		| 
						 | 
				
			
			@ -28,8 +28,8 @@ class BooksViewModel : ViewModel(), IBooksViewModel {
 | 
			
		|||
    private val client: IBibLibClient by inject()
 | 
			
		||||
    private val apiCache: IAPICacheRepository by inject()
 | 
			
		||||
 | 
			
		||||
    private val formatter_long = SimpleDateFormat("MMMM yyyy", Locale.getDefault())
 | 
			
		||||
    private val formatter_short = SimpleDateFormat("MMM yyyy", Locale.getDefault())
 | 
			
		||||
    private val formatterLong = SimpleDateFormat("MMMM yyyy", Locale.getDefault())
 | 
			
		||||
    private val formatterShort = SimpleDateFormat("MMM yyyy", Locale.getDefault())
 | 
			
		||||
 | 
			
		||||
    private val _state = MutableLiveData<IBooksViewModel.State>(IBooksViewModel.State.Initial)
 | 
			
		||||
    override val state: LiveData<IBooksViewModel.State> get() = _state
 | 
			
		||||
| 
						 | 
				
			
			@ -112,7 +112,7 @@ class BooksViewModel : ViewModel(), IBooksViewModel {
 | 
			
		|||
        date = if (releaseDate.time < 0) {
 | 
			
		||||
            null
 | 
			
		||||
        } else {
 | 
			
		||||
            formatter_long.format(releaseDate).capitalize(Locale.getDefault())
 | 
			
		||||
            formatterLong.format(releaseDate).capitalize(Locale.getDefault())
 | 
			
		||||
        },
 | 
			
		||||
        isNew = isNew,
 | 
			
		||||
    )
 | 
			
		||||
| 
						 | 
				
			
			@ -126,7 +126,7 @@ class BooksViewModel : ViewModel(), IBooksViewModel {
 | 
			
		|||
        date = if (releaseDate.time < 0) {
 | 
			
		||||
            null
 | 
			
		||||
        } else {
 | 
			
		||||
            formatter_short.format(releaseDate).capitalize(Locale.getDefault())
 | 
			
		||||
            formatterShort.format(releaseDate).capitalize(Locale.getDefault())
 | 
			
		||||
        },
 | 
			
		||||
        series = series?.name,
 | 
			
		||||
        description = synopsis ?: "",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue