Compare commits

...

3 Commits

Author SHA1 Message Date
67f8e89598 renamed gallery to settings 2022-01-16 17:50:54 +01:00
987116e877 update room version 2022-01-16 17:41:05 +01:00
7fa3f21e30 Added queries for Chats 2022-01-16 17:32:34 +01:00
7 changed files with 21 additions and 7 deletions

View File

@ -58,7 +58,7 @@ dependencies {
}
dependencies {
def room_version = '2.4.0'
def room_version = "2.4.1"
implementation "androidx.room:room-runtime:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version"
@ -76,7 +76,7 @@ dependencies {
testImplementation "androidx.room:room-testing:$room_version"
// optional - Paging 3 Integration
implementation 'androidx.room:room-paging:2.4.0'
implementation "androidx.room:room-paging:$room_version"
}
dependencies {

View File

@ -0,0 +1,6 @@
query GetChats($id: ID!, $pw: String!){
chats(user: $id, passwordHash: $pw){
id
users
}
}

View File

@ -0,0 +1,8 @@
query GetGroupChats($id: ID!, $pw: String!){
groupChats(user: $id, passwordHash: $pw){
id
users
title
description
}
}

View File

@ -51,7 +51,7 @@ class MainActivity : AppCompatActivity() {
val text: TextView = findViewById<TextView>(R.id.testData)
lifecycleScope.launchWhenResumed {
val response = apolloClient.query(GetUsersQuery()).execute()
val response = apolloClient.query(GetGroupChatsQuery("7bea8833b6d64a37ae0949619e06b692", "1234567890")).execute()
//Log.d("LaunchList", "Success ${response.data}")
text.text = response.data.toString()

View File

@ -10,12 +10,12 @@ import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.lifecycleScope
import org.ddnss.sfs.git.wdg.noise.GetUsersQuery
import org.ddnss.sfs.git.wdg.noise.apolloClient
import org.ddnss.sfs.git.wdg.noise.databinding.FragmentGalleryBinding
import org.ddnss.sfs.git.wdg.noise.databinding.FragmentSettingsBinding
class GalleryFragment : Fragment() {
private lateinit var galleryViewModel: GalleryViewModel
private var _binding: FragmentGalleryBinding? = null
private var _binding: FragmentSettingsBinding? = null
// This property is only valid between onCreateView and
// onDestroyView.
@ -31,7 +31,7 @@ class GalleryFragment : Fragment() {
galleryViewModel =
ViewModelProvider(this).get(GalleryViewModel::class.java)
_binding = FragmentGalleryBinding.inflate(inflater, container, false)
_binding = FragmentSettingsBinding.inflate(inflater, container, false)
val root: View = binding.root
return root

View File

@ -15,5 +15,5 @@
android:id="@+id/nav_gallery"
android:name="org.ddnss.sfs.git.wdg.noise.ui.gallery.GalleryFragment"
android:label="@string/menu_settings"
tools:layout="@layout/fragment_gallery" />
tools:layout="@layout/fragment_settings" />
</navigation>