c335651b6b
* Report activity core * Implement navigation * Implement navigation * Update strings * Revert manifest formatting * Implement Done page * Add landscape layout * Implement Note fragment * Create component * Implement simple status adapter * Format code * Add date/time to report statuses * Refactor status view holder * Refactor code * Refactor ViewPager * Replace MaterialButton with Button * Remove unneeded string * Update Text and Check views style * Remove old ReportActivity and rename Report2Activity to ReportActivity * Hide "report to remote instance" checkbox for local accounts * Add account, hashtag and links click handler * Add media preview * Add sensitive content support * Add status expand/collapse support * Update adapter to user adapterPosition instead of stored status * Updated checked change handling * Add polls support to report screen * Add copyright * Set buttonTint at CheckBox * Exclude reblogs from statuses for reports * Change final page check mark size * Update report note screen * Fix typos * Remove unused params from api endpoint * Replace .visibility with show()/hide() * Replace Date().time with System.currentTime... * Add line spacing * Fix close button tint issue * Updated status adapter
13 lines
429 B
Kotlin
13 lines
429 B
Kotlin
package com.keylesspalace.tusky.util
|
|
|
|
sealed class Resource<T>(open val data: T?)
|
|
|
|
class Loading<T> (override val data: T? = null) : Resource<T>(data)
|
|
|
|
class Success<T> (override val data: T? = null) : Resource<T>(data)
|
|
|
|
class Error<T> (override val data: T? = null,
|
|
val errorMessage: String? = null,
|
|
var consumed: Boolean = false,
|
|
val cause: Throwable? = null
|
|
): Resource<T>(data) |