-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
893 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...n/kotlin/de/tum/informatics/www1/artemis/native_app/feature/metistest/MetisServiceStub.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package de.tum.informatics.www1.artemis.native_app.feature.metistest | ||
|
||
import de.tum.informatics.www1.artemis.native_app.core.data.NetworkResponse | ||
import de.tum.informatics.www1.artemis.native_app.core.websocket.WebsocketProvider | ||
import de.tum.informatics.www1.artemis.native_app.feature.metis.conversation.service.network.MetisService | ||
import de.tum.informatics.www1.artemis.native_app.feature.metis.shared.content.MetisContext | ||
import de.tum.informatics.www1.artemis.native_app.feature.metis.shared.content.MetisPostDTO | ||
import de.tum.informatics.www1.artemis.native_app.feature.metis.shared.content.dto.StandalonePost | ||
import kotlinx.coroutines.flow.Flow | ||
import kotlinx.coroutines.flow.flowOf | ||
|
||
class MetisServiceStub( | ||
var posts: List<StandalonePost> = emptyList() | ||
): MetisService { | ||
|
||
override suspend fun getPosts( | ||
standalonePostsContext: MetisService.StandalonePostsContext, | ||
pageSize: Int, | ||
pageNum: Int, | ||
authToken: String, | ||
serverUrl: String | ||
): NetworkResponse<List<StandalonePost>> { | ||
return NetworkResponse.Response(posts) | ||
} | ||
|
||
override suspend fun getPost( | ||
metisContext: MetisContext, | ||
serverSidePostId: Long, | ||
serverUrl: String, | ||
authToken: String | ||
): NetworkResponse<StandalonePost> { | ||
return NetworkResponse.Response(posts.first()) | ||
} | ||
|
||
override fun subscribeToPostUpdates(metisContext: MetisContext): Flow<WebsocketProvider.WebsocketData<MetisPostDTO>> { | ||
return flowOf() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...nformatics/www1/artemis/native_app/feature/metis/conversation/ui/chatlist/ChatListItem.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.