show rules of the correct instance on the auth screen (#4358)
closes #4357
This commit is contained in:
parent
b524d57d64
commit
0d3b1b1c5a
2 changed files with 4 additions and 2 deletions
|
@ -39,7 +39,7 @@ class LoginWebViewViewModel @Inject constructor(
|
|||
if (this.domain == null) {
|
||||
this.domain = domain
|
||||
viewModelScope.launch {
|
||||
api.getInstance().fold(
|
||||
api.getInstance(domain).fold(
|
||||
{ instance ->
|
||||
_instanceRules.value = instance.rules.map { rule -> rule.text }
|
||||
},
|
||||
|
|
|
@ -89,7 +89,9 @@ interface MastodonApi {
|
|||
): NetworkResult<InstanceV1>
|
||||
|
||||
@GET("api/v2/instance")
|
||||
suspend fun getInstance(): NetworkResult<Instance>
|
||||
suspend fun getInstance(
|
||||
@Header(DOMAIN_HEADER) domain: String? = null
|
||||
): NetworkResult<Instance>
|
||||
|
||||
@GET("api/v1/filters")
|
||||
suspend fun getFiltersV1(): NetworkResult<List<FilterV1>>
|
||||
|
|
Loading…
Reference in a new issue