Skip to content
Snippets Groups Projects
Commit 8ba7600c authored by Taras's avatar Taras
Browse files

Create menu for timeline fragment

parent 66cf002d
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,6 @@ package com.futo.circles.extensions
import androidx.fragment.app.Fragment
import androidx.lifecycle.LiveData
import androidx.lifecycle.Observer
import org.matrix.android.sdk.api.failure.Failure
fun <T> LiveData<Response<T>>.observeResponse(
......@@ -24,9 +23,9 @@ fun <T> LiveData<Response<T>>.observeResponse(
fun <T> LiveData<T>.observeData(fragment: Fragment, observer: (T) -> Unit) {
val owner = fragment.viewLifecycleOwner
observe(owner, Observer {
observe(owner) {
if (it != null) observer(it)
})
}
}
suspend fun <T> createResult(block: suspend () -> T): Response<T> {
......
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="@color/inactive_menu_icon_color"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M15,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM6,10L6,7L4,7v3L1,10v2h3v3h2v-3h3v-2L6,10zM15,14c-2.67,0 -8,1.34 -8,4v2h16v-2c0,-2.66 -5.33,-4 -8,-4z" />
</vector>
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/inviteMembers"
android:icon="@drawable/ic_invite"
android:title="@string/invite_members" />
</menu>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment