From 1b6753d11971b074baf6be9d5282b587e6fb2fac Mon Sep 17 00:00:00 2001
From: mjaillot <43466872+mjaillot@users.noreply.github.com>
Date: Thu, 9 Apr 2020 22:36:59 +0200
Subject: [PATCH] User profile #79 (#90)
* Refactored myProfile page
* Total refactor of profile posts
* Merged with my-profile
* Posts displayed on profile page
* Added links to profile activity where needed
* Removed MyProfileTest with swipes
* Tests ProfileActivity from Notifications
* Add test, fix progressbar being null
---
app/build.gradle | 2 +
.../java/com/h/pixeldroid/IntentTest.kt | 123 +++++++++
.../java/com/h/pixeldroid/MockedServerTest.kt | 53 +++-
app/src/main/AndroidManifest.xml | 7 +-
.../java/com/h/pixeldroid/PostActivity.kt | 1 -
.../java/com/h/pixeldroid/ProfileActivity.kt | 104 +++++++
.../java/com/h/pixeldroid/api/PixelfedAPI.kt | 53 +++-
.../pixeldroid/fragments/MyProfileFragment.kt | 52 +++-
.../h/pixeldroid/fragments/PostFragment.kt | 23 +-
.../fragments/ProfilePostsFragment.kt | 57 ++++
.../ProfilePostsRecyclerViewAdapter.kt | 51 ++++
.../fragments/feeds/FeedFragment.kt | 5 +-
.../fragments/feeds/HomeFragment.kt | 17 +-
.../fragments/feeds/NotificationsFragment.kt | 6 +-
.../java/com/h/pixeldroid/objects/Account.kt | 17 +-
.../java/com/h/pixeldroid/objects/Context.kt | 8 +
.../java/com/h/pixeldroid/objects/Status.kt | 27 +-
.../com/h/pixeldroid/utils/ImageConverter.kt | 10 +
app/src/main/res/layout/activity_profile.xml | 161 +++++++++++
app/src/main/res/layout/fragment_home.xml | 2 -
.../main/res/layout/fragment_my_profile.xml | 258 +++++++++++-------
.../res/layout/fragment_profile_posts.xml | 21 ++
.../layout/fragment_profile_posts_list.xml | 13 +
app/src/main/res/layout/post_fragment.xml | 10 +-
24 files changed, 917 insertions(+), 164 deletions(-)
create mode 100644 app/src/androidTest/java/com/h/pixeldroid/IntentTest.kt
create mode 100644 app/src/main/java/com/h/pixeldroid/ProfileActivity.kt
create mode 100644 app/src/main/java/com/h/pixeldroid/fragments/ProfilePostsFragment.kt
create mode 100644 app/src/main/java/com/h/pixeldroid/fragments/ProfilePostsRecyclerViewAdapter.kt
create mode 100644 app/src/main/java/com/h/pixeldroid/objects/Context.kt
create mode 100644 app/src/main/res/layout/activity_profile.xml
create mode 100644 app/src/main/res/layout/fragment_profile_posts.xml
create mode 100644 app/src/main/res/layout/fragment_profile_posts_list.xml
diff --git a/app/build.gradle b/app/build.gradle
index a73417b5..9abfe120 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -75,6 +75,7 @@ dependencies {
implementation("com.github.bumptech.glide:glide:4.11.0") {
exclude group: "com.android.support"
}
+
implementation "com.github.bumptech.glide:okhttp-integration:4.11.0"
implementation ("com.github.bumptech.glide:recyclerview-integration:4.11.0") {
// Excludes the support library because it's already included by Glide.
@@ -104,6 +105,7 @@ tasks.withType(Test) {
jacoco.excludes = ['jdk.internal.*']
}
+
task jacocoTestReport(type: JacocoReport, dependsOn: ['testDebugUnitTest', 'createDebugCoverageReport']) {
reports {
diff --git a/app/src/androidTest/java/com/h/pixeldroid/IntentTest.kt b/app/src/androidTest/java/com/h/pixeldroid/IntentTest.kt
new file mode 100644
index 00000000..1b5009d5
--- /dev/null
+++ b/app/src/androidTest/java/com/h/pixeldroid/IntentTest.kt
@@ -0,0 +1,123 @@
+package com.h.pixeldroid
+
+import android.content.ComponentName
+import android.content.Context
+import android.content.Intent
+import androidx.test.core.app.ActivityScenario
+import androidx.test.espresso.Espresso
+import androidx.test.espresso.action.ViewActions
+import androidx.test.espresso.intent.Intents.intended
+import androidx.test.espresso.intent.matcher.IntentMatchers
+import androidx.test.espresso.intent.matcher.IntentMatchers.hasComponent
+import androidx.test.espresso.intent.rule.IntentsTestRule
+import androidx.test.espresso.matcher.ViewMatchers
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.platform.app.InstrumentationRegistry
+import com.google.android.material.tabs.TabLayout
+import okhttp3.mockwebserver.Dispatcher
+import okhttp3.mockwebserver.MockResponse
+import okhttp3.mockwebserver.MockWebServer
+import okhttp3.mockwebserver.RecordedRequest
+import org.hamcrest.CoreMatchers
+import org.hamcrest.Matcher
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import org.junit.rules.Timeout
+import org.junit.runner.RunWith
+
+
+@RunWith(AndroidJUnit4::class)
+class IntentTest {
+ private val accountJson = "{\n" +
+ " \"id\": \"1450\",\n" +
+ " \"username\": \"deerbard_photo\",\n" +
+ " \"acct\": \"deerbard_photo\",\n" +
+ " \"display_name\": \"deerbard photography\",\n" +
+ " \"locked\": false,\n" +
+ " \"created_at\": \"2018-08-01T12:58:21.000000Z\",\n" +
+ " \"followers_count\": 68,\n" +
+ " \"following_count\": 27,\n" +
+ " \"statuses_count\": 72,\n" +
+ " \"note\": \"\",\n" +
+ " \"url\": \"https://pixelfed.social/deerbard_photo\",\n" +
+ " \"avatar\": \"https://pixelfed.social/storage/avatars/000/000/001/450/SMSep5NoabDam1W8UDMh_avatar.png?v=4b227777d4dd1fc61c6f884f48641d02b4d121d3fd328cb08b5531fcacdabf8a\",\n" +
+ " \"avatar_static\": \"https://pixelfed.social/storage/avatars/000/000/001/450/SMSep5NoabDam1W8UDMh_avatar.png?v=4b227777d4dd1fc61c6f884f48641d02b4d121d3fd328cb08b5531fcacdabf8a\",\n" +
+ " \"header\": \"\",\n" +
+ " \"header_static\": \"\",\n" +
+ " \"emojis\": [],\n" +
+ " \"moved\": null,\n" +
+ " \"fields\": null,\n" +
+ " \"bot\": false,\n" +
+ " \"software\": \"pixelfed\",\n" +
+ " \"is_admin\": false\n" +
+ " }"
+ private val feedJson =
+ """[{"id":"140364967936397312","uri":"https:\/\/pixelfed.de\/p\/Miike\/140364967936397312","url":"https:\/\/pixelfed.de\/p\/Miike\/140364967936397312","in_reply_to_id":null,"in_reply_to_account_id":null,"reblog":null,"content":"Day 8 #rotavicentina<\/a> #hiking<\/a> #nature<\/a>","created_at":"2020-03-03T08:00:16.000000Z","emojis":[],"replies_count":0,"reblogs_count":0,"favourites_count":0,"reblogged":null,"favourited":null,"muted":null,"sensitive":false,"spoiler_text":"","visibility":"public","mentions":[],"tags":[{"name":"hiking","url":"https:\/\/pixelfed.de\/discover\/tags\/hiking"},{"name":"nature","url":"https:\/\/pixelfed.de\/discover\/tags\/nature"},{"name":"rotavicentina","url":"https:\/\/pixelfed.de\/discover\/tags\/rotavicentina"}],"card":null,"poll":null,"application":{"name":"web","website":null},"language":null,"pinned":null,"account":{"id":"115114166443970560","username":"Miike","acct":"Miike","display_name":"Miike Duart","locked":false,"created_at":"2019-12-24T15:42:35.000000Z","followers_count":14,"following_count":0,"statuses_count":71,"note":"","url":"https:\/\/pixelfed.de\/Miike","avatar":"https:\/\/pixelfed.de\/storage\/avatars\/011\/511\/416\/644\/397\/056\/0\/ZhaopLJWTWJ3hsVCS5pS_avatar.png?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","avatar_static":"https:\/\/pixelfed.de\/storage\/avatars\/011\/511\/416\/644\/397\/056\/0\/ZhaopLJWTWJ3hsVCS5pS_avatar.png?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","header":"","header_static":"","emojis":[],"moved":null,"fields":null,"bot":false,"software":"pixelfed","is_admin":false},"media_attachments":[{"id":"15888","type":"image","url":"https:\/\/pixelfed.de\/storage\/m\/113a3e2124a33b1f5511e531953f5ee48456e0c7\/34dd6d9fb1762dac8c7ddeeaf789d2d8fa083c9f\/JtjO0eAbELpgO1UZqF5ydrKbCKRVyJUM1WAaqIeB.jpeg","remote_url":null,"preview_url":"https:\/\/pixelfed.de\/storage\/m\/113a3e2124a33b1f5511e531953f5ee48456e0c7\/34dd6d9fb1762dac8c7ddeeaf789d2d8fa083c9f\/JtjO0eAbELpgO1UZqF5ydrKbCKRVyJUM1WAaqIeB_thumb.jpeg","text_url":null,"meta":null,"description":null}]},{"id":"140349785193451520","uri":"https:\/\/pixelfed.de\/p\/stephan\/140349785193451520","url":"https:\/\/pixelfed.de\/p\/stephan\/140349785193451520","in_reply_to_id":null,"in_reply_to_account_id":null,"reblog":null,"content":"","created_at":"2020-03-03T06:59:56.000000Z","emojis":[],"replies_count":0,"reblogs_count":0,"favourites_count":2,"reblogged":null,"favourited":null,"muted":null,"sensitive":false,"spoiler_text":"","visibility":"public","mentions":[],"tags":[],"card":null,"poll":null,"application":{"name":"web","website":null},"language":null,"pinned":null,"account":{"id":"908","username":"stephan","acct":"stephan","display_name":"Stephan","locked":false,"created_at":"2019-03-17T07:46:33.000000Z","followers_count":136,"following_count":25,"statuses_count":136,"note":"Musician, software developer & hobby photographer.","url":"https:\/\/pixelfed.de\/stephan","avatar":"https:\/\/pixelfed.de\/storage\/avatars\/000\/000\/000\/908\/5nQzzsB1mkwKaUqQ9GNN_avatar.png?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","avatar_static":"https:\/\/pixelfed.de\/storage\/avatars\/000\/000\/000\/908\/5nQzzsB1mkwKaUqQ9GNN_avatar.png?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","header":"","header_static":"","emojis":[],"moved":null,"fields":null,"bot":false,"software":"pixelfed","is_admin":false},"media_attachments":[{"id":"15887","type":"image","url":"https:\/\/pixelfed.de\/storage\/m\/113a3e2124a33b1f5511e531953f5ee48456e0c7\/a1349f5183c2bac7d52880e8f5188df0f3b2d62a\/mvT3nYV6Wdu42Xh56Ny4VYaWU0OzbnC3wjxiqnKS.jpeg","remote_url":null,"preview_url":"https:\/\/pixelfed.de\/storage\/m\/113a3e2124a33b1f5511e531953f5ee48456e0c7\/a1349f5183c2bac7d52880e8f5188df0f3b2d62a\/mvT3nYV6Wdu42Xh56Ny4VYaWU0OzbnC3wjxiqnKS_thumb.jpeg","text_url":null,"meta":null,"description":null}]},{"id":"140276879742603264","uri":"https:\/\/pixelfed.de\/p\/fegrimaldi\/140276879742603264","url":"https:\/\/pixelfed.de\/p\/fegrimaldi\/140276879742603264","in_reply_to_id":null,"in_reply_to_account_id":null,"reblog":null,"content":"february 2 is the day to give flowers to Iemanj\u00e1. #salvador<\/a> #bahia<\/a> #brazil<\/a> #iemanja<\/a>","created_at":"2020-03-03T02:10:14.000000Z","emojis":[],"replies_count":0,"reblogs_count":0,"favourites_count":1,"reblogged":null,"favourited":null,"muted":null,"sensitive":false,"spoiler_text":"","visibility":"public","mentions":[],"tags":[{"name":"salvador","url":"https:\/\/pixelfed.de\/discover\/tags\/salvador"},{"name":"bahia","url":"https:\/\/pixelfed.de\/discover\/tags\/bahia"},{"name":"brazil","url":"https:\/\/pixelfed.de\/discover\/tags\/brazil"},{"name":"iemanja","url":"https:\/\/pixelfed.de\/discover\/tags\/iemanja"}],"card":null,"poll":null,"application":{"name":"web","website":null},"language":null,"pinned":null,"account":{"id":"137257212828585984","username":"fegrimaldi","acct":"fegrimaldi","display_name":"Fernanda Grimaldi","locked":false,"created_at":"2020-02-23T18:11:09.000000Z","followers_count":2,"following_count":7,"statuses_count":2,"note":"a little piece of Bahia in the fediverse.","url":"https:\/\/pixelfed.de\/fegrimaldi","avatar":"https:\/\/pixelfed.de\/storage\/avatars\/013\/725\/721\/282\/858\/598\/4\/oUPBit0TJso1xNhJfFqg_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","avatar_static":"https:\/\/pixelfed.de\/storage\/avatars\/013\/725\/721\/282\/858\/598\/4\/oUPBit0TJso1xNhJfFqg_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","header":"","header_static":"","emojis":[],"moved":null,"fields":null,"bot":false,"software":"pixelfed","is_admin":false},"media_attachments":[{"id":"15886","type":"image","url":"https:\/\/pixelfed.de\/storage\/m\/113a3e2124a33b1f5511e531953f5ee48456e0c7\/feb878b4bd60b85ac840670c6b9c809fd76b628b\/lYMrx0WF8LDqn0vTRgNJaRs7stMKtAXrgzpMrWEr.jpeg","remote_url":null,"preview_url":"https:\/\/pixelfed.de\/storage\/m\/113a3e2124a33b1f5511e531953f5ee48456e0c7\/feb878b4bd60b85ac840670c6b9c809fd76b628b\/lYMrx0WF8LDqn0vTRgNJaRs7stMKtAXrgzpMrWEr_thumb.jpeg","text_url":null,"meta":null,"description":null}]}]"""
+ private val notificationsJson =
+ "[{\"id\":\"45945\",\"type\":\"favourite\",\"created_at\":\"2020-03-15T14:49:20.000000Z\",\"account\":{\"id\":\"136800034732773376\",\"username\":\"Dobios\",\"acct\":\"Dobios\",\"display_name\":\"Andrew Dobis\",\"locked\":false,\"created_at\":\"2020-02-22T11:54:29.000000Z\",\"followers_count\":2,\"following_count\":1,\"statuses_count\":0,\"note\":\"\",\"url\":\"https:\\/\\/pixelfed.de\\/Dobios\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false},\"status\":{\"id\":\"144456497894658048\",\"uri\":\"https:\\/\\/pixelfed.de\\/p\\/dante\\/144456497894658048\",\"url\":\"https:\\/\\/pixelfed.de\\/p\\/dante\\/144456497894658048\",\"in_reply_to_id\":null,\"in_reply_to_account_id\":null,\"reblog\":null,\"content\":\"Saturn V launch\",\"created_at\":\"2020-03-14T14:58:32.000000Z\",\"emojis\":[],\"replies_count\":0,\"reblogs_count\":1,\"favourites_count\":6,\"reblogged\":null,\"favourited\":null,\"muted\":null,\"sensitive\":false,\"spoiler_text\":\"\",\"visibility\":\"public\",\"mentions\":[],\"tags\":[],\"card\":null,\"poll\":null,\"application\":{\"name\":\"web\",\"website\":null},\"language\":null,\"pinned\":null,\"account\":{\"id\":\"136453537340198912\",\"username\":\"Dante\",\"acct\":\"dante\",\"display_name\":\"Dante\",\"locked\":false,\"created_at\":\"2020-02-21T12:57:38.000000Z\",\"followers_count\":3,\"following_count\":4,\"statuses_count\":1,\"note\":\"\",\"url\":\"https:\\/\\/pixelfed.de\\/dante\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false},\"media_attachments\":[{\"id\":\"16583\",\"type\":\"image\",\"url\":\"https:\\/\\/pixelfed.de\\/storage\\/m\\/113a3e2124a33b1f5511e531953f5ee48456e0c7\\/0fa8bbe19cc23442034913a7c97fbe4527c1d63a\\/vs2vouJ86OvzxhK9ewhPlfPf4Y9IoQ5CHfiBIqad.jpeg\",\"remote_url\":null,\"preview_url\":\"https:\\/\\/pixelfed.de\\/storage\\/m\\/113a3e2124a33b1f5511e531953f5ee48456e0c7\\/0fa8bbe19cc23442034913a7c97fbe4527c1d63a\\/vs2vouJ86OvzxhK9ewhPlfPf4Y9IoQ5CHfiBIqad_thumb.jpeg\",\"text_url\":null,\"meta\":null,\"description\":null}]}},{\"id\":\"45944\",\"type\":\"follow\",\"created_at\":\"2020-03-15T14:49:11.000000Z\",\"account\":{\"id\":\"136800034732773376\",\"username\":\"Dobios\",\"acct\":\"Dobios\",\"display_name\":\"Andrew Dobis\",\"locked\":false,\"created_at\":\"2020-02-22T11:54:29.000000Z\",\"followers_count\":2,\"following_count\":1,\"statuses_count\":0,\"note\":\"\",\"url\":\"https:\\/\\/pixelfed.de\\/Dobios\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false}},{\"id\":\"45942\",\"type\":\"reblog\",\"created_at\":\"2020-03-15T14:41:04.000000Z\",\"account\":{\"id\":\"144813993922531328\",\"username\":\"Clement\",\"acct\":\"Clement\",\"display_name\":\"Andrea\",\"locked\":false,\"created_at\":\"2020-03-15T14:39:06.000000Z\",\"followers_count\":0,\"following_count\":2,\"statuses_count\":0,\"note\":\"\",\"url\":\"https:\\/\\/pixelfed.de\\/Clement\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false},\"status\":{\"id\":\"144814478708576256\",\"uri\":\"https:\\/\\/pixelfed.de\\/p\\/Clement\\/144814478708576256\",\"url\":\"https:\\/\\/pixelfed.de\\/p\\/Clement\\/144814478708576256\",\"in_reply_to_id\":null,\"in_reply_to_account_id\":136453537340198912,\"reblog\":null,\"content\":\"\",\"created_at\":\"2020-03-15T14:41:02.000000Z\",\"emojis\":[],\"replies_count\":0,\"reblogs_count\":0,\"favourites_count\":0,\"reblogged\":null,\"favourited\":null,\"muted\":null,\"sensitive\":false,\"spoiler_text\":\"\",\"visibility\":\"public\",\"mentions\":[],\"tags\":[],\"card\":null,\"poll\":null,\"application\":{\"name\":\"web\",\"website\":null},\"language\":null,\"pinned\":null,\"account\":{\"id\":\"144813993922531328\",\"username\":\"Clement\",\"acct\":\"Clement\",\"display_name\":\"Andrea\",\"locked\":false,\"created_at\":\"2020-03-15T14:39:06.000000Z\",\"followers_count\":0,\"following_count\":2,\"statuses_count\":0,\"note\":\"\",\"url\":\"https:\\/\\/pixelfed.de\\/Clement\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false}}},{\"id\":\"45941\",\"type\":\"mention\",\"created_at\":\"2020-03-15T14:40:52.000000Z\",\"account\":{\"id\":\"144813993922531328\",\"username\":\"Clement\",\"acct\":\"Clement\",\"display_name\":\"Andrea\",\"locked\":false,\"created_at\":\"2020-03-15T14:39:06.000000Z\",\"followers_count\":0,\"following_count\":2,\"statuses_count\":0,\"note\":\"\",\"url\":\"https:\\/\\/pixelfed.de\\/Clement\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false},\"status\":{\"id\":\"144814428691501056\",\"uri\":\"https:\\/\\/pixelfed.de\\/p\\/Clement\\/144814428691501056\",\"url\":\"https:\\/\\/pixelfed.de\\/p\\/Clement\\/144814428691501056\",\"in_reply_to_id\":144456497894658048,\"in_reply_to_account_id\":136453537340198912,\"reblog\":null,\"content\":\"@dante<\\/a> I identify to this pic.\",\"created_at\":\"2020-03-15T14:40:50.000000Z\",\"emojis\":[],\"replies_count\":0,\"reblogs_count\":0,\"favourites_count\":1,\"reblogged\":null,\"favourited\":null,\"muted\":null,\"sensitive\":false,\"spoiler_text\":\"\",\"visibility\":\"public\",\"mentions\":[{\"id\":\"136453537340198912\",\"url\":\"https:\\/\\/pixelfed.de\\/dante\",\"username\":\"dante\",\"acct\":\"dante\"}],\"tags\":[],\"card\":null,\"poll\":null,\"application\":{\"name\":\"web\",\"website\":null},\"language\":null,\"pinned\":null,\"account\":{\"id\":\"144813993922531328\",\"username\":\"Clement\",\"acct\":\"Clement\",\"display_name\":\"Andrea\",\"locked\":false,\"created_at\":\"2020-03-15T14:39:06.000000Z\",\"followers_count\":0,\"following_count\":2,\"statuses_count\":0,\"note\":\"\",\"url\":\"https:\\/\\/pixelfed.de\\/Clement\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false}}},{\"id\":\"45940\",\"type\":\"favourite\",\"created_at\":\"2020-03-15T14:40:22.000000Z\",\"account\":{\"id\":\"144813993922531328\",\"username\":\"Clement\",\"acct\":\"Clement\",\"display_name\":\"Andrea\",\"locked\":false,\"created_at\":\"2020-03-15T14:39:06.000000Z\",\"followers_count\":0,\"following_count\":2,\"statuses_count\":0,\"note\":\"\",\"url\":\"https:\\/\\/pixelfed.de\\/Clement\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false},\"status\":{\"id\":\"144456497894658048\",\"uri\":\"https:\\/\\/pixelfed.de\\/p\\/dante\\/144456497894658048\",\"url\":\"https:\\/\\/pixelfed.de\\/p\\/dante\\/144456497894658048\",\"in_reply_to_id\":null,\"in_reply_to_account_id\":null,\"reblog\":null,\"content\":\"Saturn V launch\",\"created_at\":\"2020-03-14T14:58:32.000000Z\",\"emojis\":[],\"replies_count\":0,\"reblogs_count\":1,\"favourites_count\":6,\"reblogged\":null,\"favourited\":null,\"muted\":null,\"sensitive\":false,\"spoiler_text\":\"\",\"visibility\":\"public\",\"mentions\":[],\"tags\":[],\"card\":null,\"poll\":null,\"application\":{\"name\":\"web\",\"website\":null},\"language\":null,\"pinned\":null,\"account\":{\"id\":\"136453537340198912\",\"username\":\"dante\",\"acct\":\"dante\",\"display_name\":\"Dante\",\"locked\":false,\"created_at\":\"2020-02-21T12:57:38.000000Z\",\"followers_count\":3,\"following_count\":4,\"statuses_count\":1,\"note\":\"\",\"url\":\"https:\\/\\/pixelfed.de\\/dante\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false},\"media_attachments\":[{\"id\":\"16583\",\"type\":\"image\",\"url\":\"https:\\/\\/pixelfed.de\\/storage\\/m\\/113a3e2124a33b1f5511e531953f5ee48456e0c7\\/0fa8bbe19cc23442034913a7c97fbe4527c1d63a\\/vs2vouJ86OvzxhK9ewhPlfPf4Y9IoQ5CHfiBIqad.jpeg\",\"remote_url\":null,\"preview_url\":\"https:\\/\\/pixelfed.de\\/storage\\/m\\/113a3e2124a33b1f5511e531953f5ee48456e0c7\\/0fa8bbe19cc23442034913a7c97fbe4527c1d63a\\/vs2vouJ86OvzxhK9ewhPlfPf4Y9IoQ5CHfiBIqad_thumb.jpeg\",\"text_url\":null,\"meta\":null,\"description\":null}]}},{\"id\":\"45939\",\"type\":\"follow\",\"created_at\":\"2020-03-15T14:40:12.000000Z\",\"account\":{\"id\":\"144813993922531328\",\"username\":\"Clement\",\"acct\":\"Clement\",\"display_name\":\"Andrea\",\"locked\":false,\"created_at\":\"2020-03-15T14:39:06.000000Z\",\"followers_count\":0,\"following_count\":2,\"statuses_count\":0,\"note\":\"\",\"url\":\"https:\\/\\/pixelfed.de\\/Clement\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false}},{\"id\":\"45804\",\"type\":\"favourite\",\"created_at\":\"2020-03-15T02:22:47.000000Z\",\"account\":{\"id\":\"131984031779786752\",\"username\":\"joska\",\"acct\":\"joska\",\"display_name\":\"jxzk\",\"locked\":false,\"created_at\":\"2020-02-09T04:57:25.000000Z\",\"followers_count\":3,\"following_count\":2,\"statuses_count\":82,\"note\":\"Feliz :D\",\"url\":\"https:\\/\\/pixelfed.de\\/joska\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/013\\/198\\/403\\/177\\/978\\/675\\/2\\/zhytNrT3ij5cHBXX1mJv_avatar.jpeg?v=4fc82b26aecb47d2868c4efbe3581732a3e7cbcc6c2efb32062c08170a05eeb8\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/013\\/198\\/403\\/177\\/978\\/675\\/2\\/zhytNrT3ij5cHBXX1mJv_avatar.jpeg?v=4fc82b26aecb47d2868c4efbe3581732a3e7cbcc6c2efb32062c08170a05eeb8\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false},\"status\":{\"id\":\"144456497894658048\",\"uri\":\"https:\\/\\/pixelfed.de\\/p\\/dante\\/144456497894658048\",\"url\":\"https:\\/\\/pixelfed.de\\/p\\/dante\\/144456497894658048\",\"in_reply_to_id\":null,\"in_reply_to_account_id\":null,\"reblog\":null,\"content\":\"Saturn V launch\",\"created_at\":\"2020-03-14T14:58:32.000000Z\",\"emojis\":[],\"replies_count\":0,\"reblogs_count\":1,\"favourites_count\":6,\"reblogged\":null,\"favourited\":null,\"muted\":null,\"sensitive\":false,\"spoiler_text\":\"\",\"visibility\":\"public\",\"mentions\":[],\"tags\":[],\"card\":null,\"poll\":null,\"application\":{\"name\":\"web\",\"website\":null},\"language\":null,\"pinned\":null,\"account\":{\"id\":\"136453537340198912\",\"username\":\"dante\",\"acct\":\"dante\",\"display_name\":\"Dante\",\"locked\":false,\"created_at\":\"2020-02-21T12:57:38.000000Z\",\"followers_count\":3,\"following_count\":4,\"statuses_count\":1,\"note\":\"\",\"url\":\"https:\\/\\/pixelfed.de\\/dante\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false},\"media_attachments\":[{\"id\":\"16583\",\"type\":\"image\",\"url\":\"https:\\/\\/pixelfed.de\\/storage\\/m\\/113a3e2124a33b1f5511e531953f5ee48456e0c7\\/0fa8bbe19cc23442034913a7c97fbe4527c1d63a\\/vs2vouJ86OvzxhK9ewhPlfPf4Y9IoQ5CHfiBIqad.jpeg\",\"remote_url\":null,\"preview_url\":\"https:\\/\\/pixelfed.de\\/storage\\/m\\/113a3e2124a33b1f5511e531953f5ee48456e0c7\\/0fa8bbe19cc23442034913a7c97fbe4527c1d63a\\/vs2vouJ86OvzxhK9ewhPlfPf4Y9IoQ5CHfiBIqad_thumb.jpeg\",\"text_url\":null,\"meta\":null,\"description\":null}]}},{\"id\":\"45783\",\"type\":\"favourite\",\"created_at\":\"2020-03-15T00:45:53.000000Z\",\"account\":{\"id\":\"139939422090170368\",\"username\":\"DrMsch\",\"acct\":\"DrMsch\",\"display_name\":\"Mische\",\"locked\":false,\"created_at\":\"2020-03-02T03:49:18.000000Z\",\"followers_count\":13,\"following_count\":21,\"statuses_count\":9,\"note\":\"TelefonFotos und Malereien von DerMische\",\"url\":\"https:\\/\\/pixelfed.de\\/DrMsch\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/013\\/993\\/942\\/209\\/017\\/036\\/8\\/xQUOq3tBNgOhFItKMZ56_avatar.jpeg?v=4fc82b26aecb47d2868c4efbe3581732a3e7cbcc6c2efb32062c08170a05eeb8\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/013\\/993\\/942\\/209\\/017\\/036\\/8\\/xQUOq3tBNgOhFItKMZ56_avatar.jpeg?v=4fc82b26aecb47d2868c4efbe3581732a3e7cbcc6c2efb32062c08170a05eeb8\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false},\"status\":{\"id\":\"144456497894658048\",\"uri\":\"https:\\/\\/pixelfed.de\\/p\\/dante\\/144456497894658048\",\"url\":\"https:\\/\\/pixelfed.de\\/p\\/dante\\/144456497894658048\",\"in_reply_to_id\":null,\"in_reply_to_account_id\":null,\"reblog\":null,\"content\":\"Saturn V launch\",\"created_at\":\"2020-03-14T14:58:32.000000Z\",\"emojis\":[],\"replies_count\":0,\"reblogs_count\":1,\"favourites_count\":6,\"reblogged\":null,\"favourited\":null,\"muted\":null,\"sensitive\":false,\"spoiler_text\":\"\",\"visibility\":\"public\",\"mentions\":[],\"tags\":[],\"card\":null,\"poll\":null,\"application\":{\"name\":\"web\",\"website\":null},\"language\":null,\"pinned\":null,\"account\":{\"id\":\"136453537340198912\",\"username\":\"dante\",\"acct\":\"dante\",\"display_name\":\"Dante\",\"locked\":false,\"created_at\":\"2020-02-21T12:57:38.000000Z\",\"followers_count\":3,\"following_count\":4,\"statuses_count\":1,\"note\":\"\",\"url\":\"https:\\/\\/pixelfed.de\\/dante\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false},\"media_attachments\":[{\"id\":\"16583\",\"type\":\"image\",\"url\":\"https:\\/\\/pixelfed.de\\/storage\\/m\\/113a3e2124a33b1f5511e531953f5ee48456e0c7\\/0fa8bbe19cc23442034913a7c97fbe4527c1d63a\\/vs2vouJ86OvzxhK9ewhPlfPf4Y9IoQ5CHfiBIqad.jpeg\",\"remote_url\":null,\"preview_url\":\"https:\\/\\/pixelfed.de\\/storage\\/m\\/113a3e2124a33b1f5511e531953f5ee48456e0c7\\/0fa8bbe19cc23442034913a7c97fbe4527c1d63a\\/vs2vouJ86OvzxhK9ewhPlfPf4Y9IoQ5CHfiBIqad_thumb.jpeg\",\"text_url\":null,\"meta\":null,\"description\":null}]}},{\"id\":\"45768\",\"type\":\"favourite\",\"created_at\":\"2020-03-14T22:43:18.000000Z\",\"account\":{\"id\":\"139819612522024960\",\"username\":\"vitorpires\",\"acct\":\"vitorpires\",\"display_name\":\"Vitor Pires\",\"locked\":false,\"created_at\":\"2020-03-01T19:53:13.000000Z\",\"followers_count\":20,\"following_count\":8,\"statuses_count\":42,\"note\":\"photography\\/graphic design\\/desktop publishing\\/illustration\\/3D animation\\/video\\/content writing\\/teaching\\/woodworking\\/luthier\",\"url\":\"https:\\/\\/pixelfed.de\\/vitorpires\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/013\\/981\\/961\\/252\\/202\\/496\\/0\\/2HB6Gs2m5NaSys7W5ikG_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/013\\/981\\/961\\/252\\/202\\/496\\/0\\/2HB6Gs2m5NaSys7W5ikG_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false},\"status\":{\"id\":\"144456497894658048\",\"uri\":\"https:\\/\\/pixelfed.de\\/p\\/dante\\/144456497894658048\",\"url\":\"https:\\/\\/pixelfed.de\\/p\\/dante\\/144456497894658048\",\"in_reply_to_id\":null,\"in_reply_to_account_id\":null,\"reblog\":null,\"content\":\"Saturn V launch\",\"created_at\":\"2020-03-14T14:58:32.000000Z\",\"emojis\":[],\"replies_count\":0,\"reblogs_count\":1,\"favourites_count\":6,\"reblogged\":null,\"favourited\":null,\"muted\":null,\"sensitive\":false,\"spoiler_text\":\"\",\"visibility\":\"public\",\"mentions\":[],\"tags\":[],\"card\":null,\"poll\":null,\"application\":{\"name\":\"web\",\"website\":null},\"language\":null,\"pinned\":null,\"account\":{\"id\":\"136453537340198912\",\"username\":\"dante\",\"acct\":\"dante\",\"display_name\":\"Dante\",\"locked\":false,\"created_at\":\"2020-02-21T12:57:38.000000Z\",\"followers_count\":3,\"following_count\":4,\"statuses_count\":1,\"note\":\"\",\"url\":\"https:\\/\\/pixelfed.de\\/dante\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false},\"media_attachments\":[{\"id\":\"16583\",\"type\":\"image\",\"url\":\"https:\\/\\/pixelfed.de\\/storage\\/m\\/113a3e2124a33b1f5511e531953f5ee48456e0c7\\/0fa8bbe19cc23442034913a7c97fbe4527c1d63a\\/vs2vouJ86OvzxhK9ewhPlfPf4Y9IoQ5CHfiBIqad.jpeg\",\"remote_url\":null,\"preview_url\":\"https:\\/\\/pixelfed.de\\/storage\\/m\\/113a3e2124a33b1f5511e531953f5ee48456e0c7\\/0fa8bbe19cc23442034913a7c97fbe4527c1d63a\\/vs2vouJ86OvzxhK9ewhPlfPf4Y9IoQ5CHfiBIqad_thumb.jpeg\",\"text_url\":null,\"meta\":null,\"description\":null}]}},{\"id\":\"45723\",\"type\":\"favourite\",\"created_at\":\"2020-03-14T15:01:49.000000Z\",\"account\":{\"id\":\"79574199701737472\",\"username\":\"Spaziergaenger\",\"acct\":\"Spaziergaenger\",\"display_name\":\"anonymous\",\"locked\":false,\"created_at\":\"2019-09-17T13:59:27.000000Z\",\"followers_count\":40,\"following_count\":0,\"statuses_count\":894,\"note\":\"\",\"url\":\"https:\\/\\/pixelfed.de\\/Spaziergaenger\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/007\\/957\\/419\\/970\\/173\\/747\\/2\\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/007\\/957\\/419\\/970\\/173\\/747\\/2\\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false},\"status\":{\"id\":\"144456497894658048\",\"uri\":\"https:\\/\\/pixelfed.de\\/p\\/dante\\/144456497894658048\",\"url\":\"https:\\/\\/pixelfed.de\\/p\\/dante\\/144456497894658048\",\"in_reply_to_id\":null,\"in_reply_to_account_id\":null,\"reblog\":null,\"content\":\"Saturn V launch\",\"created_at\":\"2020-03-14T14:58:32.000000Z\",\"emojis\":[],\"replies_count\":0,\"reblogs_count\":1,\"favourites_count\":6,\"reblogged\":null,\"favourited\":null,\"muted\":null,\"sensitive\":false,\"spoiler_text\":\"\",\"visibility\":\"public\",\"mentions\":[],\"tags\":[],\"card\":null,\"poll\":null,\"application\":{\"name\":\"web\",\"website\":null},\"language\":null,\"pinned\":null,\"account\":{\"id\":\"136453537340198912\",\"username\":\"dante\",\"acct\":\"dante\",\"display_name\":\"Dante\",\"locked\":false,\"created_at\":\"2020-02-21T12:57:38.000000Z\",\"followers_count\":3,\"following_count\":4,\"statuses_count\":1,\"note\":\"\",\"url\":\"https:\\/\\/pixelfed.de\\/dante\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false},\"media_attachments\":[{\"id\":\"16583\",\"type\":\"image\",\"url\":\"https:\\/\\/pixelfed.de\\/storage\\/m\\/113a3e2124a33b1f5511e531953f5ee48456e0c7\\/0fa8bbe19cc23442034913a7c97fbe4527c1d63a\\/vs2vouJ86OvzxhK9ewhPlfPf4Y9IoQ5CHfiBIqad.jpeg\",\"remote_url\":null,\"preview_url\":\"https:\\/\\/pixelfed.de\\/storage\\/m\\/113a3e2124a33b1f5511e531953f5ee48456e0c7\\/0fa8bbe19cc23442034913a7c97fbe4527c1d63a\\/vs2vouJ86OvzxhK9ewhPlfPf4Y9IoQ5CHfiBIqad_thumb.jpeg\",\"text_url\":null,\"meta\":null,\"description\":null}]}}]"
+
+ @get:Rule
+ var globalTimeout: Timeout = Timeout.seconds(100)
+
+ @get:Rule
+ var mLoginActivityActivityTestRule =
+ IntentsTestRule(
+ LoginActivity::class.java
+ )
+ private val dispatcher: Dispatcher = object : Dispatcher() {
+ @Throws(InterruptedException::class)
+ override fun dispatch(request: RecordedRequest): MockResponse {
+ when (request.path) {
+ "/api/v1/accounts/verify_credentials" -> return MockResponse().addHeader(
+ "Content-Type",
+ "application/json; charset=utf-8"
+ ).setResponseCode(200).setBody(accountJson)
+ }
+ if (request.path?.startsWith("/api/v1/notifications") == true) {
+ return MockResponse()
+ .addHeader("Content-Type", "application/json; charset=utf-8")
+ .setResponseCode(200).setBody(notificationsJson)
+ } else if (request.path?.startsWith("/api/v1/timelines/home") == true) {
+ return MockResponse().addHeader(
+ "Content-Type",
+ "application/json; charset=utf-8"
+ ).setResponseCode(200).setBody(feedJson)
+ }
+ return MockResponse().setResponseCode(404)
+ }
+ }
+
+ @Before
+ fun before() {
+ val server = MockWebServer()
+ server.dispatcher = dispatcher
+ server.start()
+ val baseUrl = server.url("")
+ val preferences = InstrumentationRegistry.getInstrumentation()
+ .targetContext.getSharedPreferences("com.h.pixeldroid.pref", Context.MODE_PRIVATE)
+ preferences.edit().putString("accessToken", "azerty").apply()
+ preferences.edit().putString("domain", baseUrl.toString()).apply()
+ }
+
+
+ @Test
+ fun launchesIntent() {
+ ActivityScenario.launch(MainActivity::class.java).onActivity { a ->
+ a.findViewById(R.id.tabs).getTabAt(4)?.select()
+ }
+ val expectedIntent: Matcher = CoreMatchers.allOf(
+ IntentMatchers.hasAction(Intent.ACTION_VIEW),
+ IntentMatchers.hasDataString(CoreMatchers.containsString("settings/home"))
+ )
+
+ Thread.sleep(1000)
+
+ Espresso.onView(ViewMatchers.withId(R.id.editButton)).perform(ViewActions.click())
+ Thread.sleep(1000)
+
+ intended(expectedIntent)
+
+
+ }
+}
\ No newline at end of file
diff --git a/app/src/androidTest/java/com/h/pixeldroid/MockedServerTest.kt b/app/src/androidTest/java/com/h/pixeldroid/MockedServerTest.kt
index 10a52324..460b16af 100644
--- a/app/src/androidTest/java/com/h/pixeldroid/MockedServerTest.kt
+++ b/app/src/androidTest/java/com/h/pixeldroid/MockedServerTest.kt
@@ -1,6 +1,7 @@
package com.h.pixeldroid
import android.content.Context
+import android.content.Intent
import android.view.Gravity
import androidx.test.core.app.ActivityScenario
import androidx.test.espresso.Espresso.onView
@@ -9,6 +10,9 @@ import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.contrib.DrawerActions
import androidx.test.espresso.contrib.DrawerMatchers
import androidx.test.espresso.contrib.NavigationViewActions
+import androidx.test.espresso.intent.Intents
+import androidx.test.espresso.intent.matcher.IntentMatchers
+import androidx.test.espresso.intent.rule.IntentsTestRule
import androidx.test.espresso.matcher.ViewMatchers
import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.espresso.matcher.ViewMatchers.withText
@@ -20,6 +24,8 @@ import okhttp3.mockwebserver.Dispatcher
import okhttp3.mockwebserver.MockResponse
import okhttp3.mockwebserver.MockWebServer
import okhttp3.mockwebserver.RecordedRequest
+import org.hamcrest.CoreMatchers
+import org.hamcrest.Matcher
import org.junit.Before
import org.junit.Rule
import org.junit.Test
@@ -54,12 +60,13 @@ class MockedServerTest {
" }"
private val feedJson = """[{"id":"140364967936397312","uri":"https:\/\/pixelfed.de\/p\/Miike\/140364967936397312","url":"https:\/\/pixelfed.de\/p\/Miike\/140364967936397312","in_reply_to_id":null,"in_reply_to_account_id":null,"reblog":null,"content":"Day 8 #rotavicentina<\/a> #hiking<\/a> #nature<\/a>","created_at":"2020-03-03T08:00:16.000000Z","emojis":[],"replies_count":0,"reblogs_count":0,"favourites_count":0,"reblogged":null,"favourited":null,"muted":null,"sensitive":false,"spoiler_text":"","visibility":"public","mentions":[],"tags":[{"name":"hiking","url":"https:\/\/pixelfed.de\/discover\/tags\/hiking"},{"name":"nature","url":"https:\/\/pixelfed.de\/discover\/tags\/nature"},{"name":"rotavicentina","url":"https:\/\/pixelfed.de\/discover\/tags\/rotavicentina"}],"card":null,"poll":null,"application":{"name":"web","website":null},"language":null,"pinned":null,"account":{"id":"115114166443970560","username":"Miike","acct":"Miike","display_name":"Miike Duart","locked":false,"created_at":"2019-12-24T15:42:35.000000Z","followers_count":14,"following_count":0,"statuses_count":71,"note":"","url":"https:\/\/pixelfed.de\/Miike","avatar":"https:\/\/pixelfed.de\/storage\/avatars\/011\/511\/416\/644\/397\/056\/0\/ZhaopLJWTWJ3hsVCS5pS_avatar.png?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","avatar_static":"https:\/\/pixelfed.de\/storage\/avatars\/011\/511\/416\/644\/397\/056\/0\/ZhaopLJWTWJ3hsVCS5pS_avatar.png?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","header":"","header_static":"","emojis":[],"moved":null,"fields":null,"bot":false,"software":"pixelfed","is_admin":false},"media_attachments":[{"id":"15888","type":"image","url":"https:\/\/pixelfed.de\/storage\/m\/113a3e2124a33b1f5511e531953f5ee48456e0c7\/34dd6d9fb1762dac8c7ddeeaf789d2d8fa083c9f\/JtjO0eAbELpgO1UZqF5ydrKbCKRVyJUM1WAaqIeB.jpeg","remote_url":null,"preview_url":"https:\/\/pixelfed.de\/storage\/m\/113a3e2124a33b1f5511e531953f5ee48456e0c7\/34dd6d9fb1762dac8c7ddeeaf789d2d8fa083c9f\/JtjO0eAbELpgO1UZqF5ydrKbCKRVyJUM1WAaqIeB_thumb.jpeg","text_url":null,"meta":null,"description":null}]},{"id":"140349785193451520","uri":"https:\/\/pixelfed.de\/p\/stephan\/140349785193451520","url":"https:\/\/pixelfed.de\/p\/stephan\/140349785193451520","in_reply_to_id":null,"in_reply_to_account_id":null,"reblog":null,"content":"","created_at":"2020-03-03T06:59:56.000000Z","emojis":[],"replies_count":0,"reblogs_count":0,"favourites_count":2,"reblogged":null,"favourited":null,"muted":null,"sensitive":false,"spoiler_text":"","visibility":"public","mentions":[],"tags":[],"card":null,"poll":null,"application":{"name":"web","website":null},"language":null,"pinned":null,"account":{"id":"908","username":"stephan","acct":"stephan","display_name":"Stephan","locked":false,"created_at":"2019-03-17T07:46:33.000000Z","followers_count":136,"following_count":25,"statuses_count":136,"note":"Musician, software developer & hobby photographer.","url":"https:\/\/pixelfed.de\/stephan","avatar":"https:\/\/pixelfed.de\/storage\/avatars\/000\/000\/000\/908\/5nQzzsB1mkwKaUqQ9GNN_avatar.png?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","avatar_static":"https:\/\/pixelfed.de\/storage\/avatars\/000\/000\/000\/908\/5nQzzsB1mkwKaUqQ9GNN_avatar.png?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","header":"","header_static":"","emojis":[],"moved":null,"fields":null,"bot":false,"software":"pixelfed","is_admin":false},"media_attachments":[{"id":"15887","type":"image","url":"https:\/\/pixelfed.de\/storage\/m\/113a3e2124a33b1f5511e531953f5ee48456e0c7\/a1349f5183c2bac7d52880e8f5188df0f3b2d62a\/mvT3nYV6Wdu42Xh56Ny4VYaWU0OzbnC3wjxiqnKS.jpeg","remote_url":null,"preview_url":"https:\/\/pixelfed.de\/storage\/m\/113a3e2124a33b1f5511e531953f5ee48456e0c7\/a1349f5183c2bac7d52880e8f5188df0f3b2d62a\/mvT3nYV6Wdu42Xh56Ny4VYaWU0OzbnC3wjxiqnKS_thumb.jpeg","text_url":null,"meta":null,"description":null}]},{"id":"140276879742603264","uri":"https:\/\/pixelfed.de\/p\/fegrimaldi\/140276879742603264","url":"https:\/\/pixelfed.de\/p\/fegrimaldi\/140276879742603264","in_reply_to_id":null,"in_reply_to_account_id":null,"reblog":null,"content":"february 2 is the day to give flowers to Iemanj\u00e1. #salvador<\/a> #bahia<\/a> #brazil<\/a> #iemanja<\/a>","created_at":"2020-03-03T02:10:14.000000Z","emojis":[],"replies_count":0,"reblogs_count":0,"favourites_count":1,"reblogged":null,"favourited":null,"muted":null,"sensitive":false,"spoiler_text":"","visibility":"public","mentions":[],"tags":[{"name":"salvador","url":"https:\/\/pixelfed.de\/discover\/tags\/salvador"},{"name":"bahia","url":"https:\/\/pixelfed.de\/discover\/tags\/bahia"},{"name":"brazil","url":"https:\/\/pixelfed.de\/discover\/tags\/brazil"},{"name":"iemanja","url":"https:\/\/pixelfed.de\/discover\/tags\/iemanja"}],"card":null,"poll":null,"application":{"name":"web","website":null},"language":null,"pinned":null,"account":{"id":"137257212828585984","username":"fegrimaldi","acct":"fegrimaldi","display_name":"Fernanda Grimaldi","locked":false,"created_at":"2020-02-23T18:11:09.000000Z","followers_count":2,"following_count":7,"statuses_count":2,"note":"a little piece of Bahia in the fediverse.","url":"https:\/\/pixelfed.de\/fegrimaldi","avatar":"https:\/\/pixelfed.de\/storage\/avatars\/013\/725\/721\/282\/858\/598\/4\/oUPBit0TJso1xNhJfFqg_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","avatar_static":"https:\/\/pixelfed.de\/storage\/avatars\/013\/725\/721\/282\/858\/598\/4\/oUPBit0TJso1xNhJfFqg_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","header":"","header_static":"","emojis":[],"moved":null,"fields":null,"bot":false,"software":"pixelfed","is_admin":false},"media_attachments":[{"id":"15886","type":"image","url":"https:\/\/pixelfed.de\/storage\/m\/113a3e2124a33b1f5511e531953f5ee48456e0c7\/feb878b4bd60b85ac840670c6b9c809fd76b628b\/lYMrx0WF8LDqn0vTRgNJaRs7stMKtAXrgzpMrWEr.jpeg","remote_url":null,"preview_url":"https:\/\/pixelfed.de\/storage\/m\/113a3e2124a33b1f5511e531953f5ee48456e0c7\/feb878b4bd60b85ac840670c6b9c809fd76b628b\/lYMrx0WF8LDqn0vTRgNJaRs7stMKtAXrgzpMrWEr_thumb.jpeg","text_url":null,"meta":null,"description":null}]}]"""
private val notificationsJson = "[{\"id\":\"45945\",\"type\":\"favourite\",\"created_at\":\"2020-03-15T14:49:20.000000Z\",\"account\":{\"id\":\"136800034732773376\",\"username\":\"Dobios\",\"acct\":\"Dobios\",\"display_name\":\"Andrew Dobis\",\"locked\":false,\"created_at\":\"2020-02-22T11:54:29.000000Z\",\"followers_count\":2,\"following_count\":1,\"statuses_count\":0,\"note\":\"\",\"url\":\"https:\\/\\/pixelfed.de\\/Dobios\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false},\"status\":{\"id\":\"144456497894658048\",\"uri\":\"https:\\/\\/pixelfed.de\\/p\\/dante\\/144456497894658048\",\"url\":\"https:\\/\\/pixelfed.de\\/p\\/dante\\/144456497894658048\",\"in_reply_to_id\":null,\"in_reply_to_account_id\":null,\"reblog\":null,\"content\":\"Saturn V launch\",\"created_at\":\"2020-03-14T14:58:32.000000Z\",\"emojis\":[],\"replies_count\":0,\"reblogs_count\":1,\"favourites_count\":6,\"reblogged\":null,\"favourited\":null,\"muted\":null,\"sensitive\":false,\"spoiler_text\":\"\",\"visibility\":\"public\",\"mentions\":[],\"tags\":[],\"card\":null,\"poll\":null,\"application\":{\"name\":\"web\",\"website\":null},\"language\":null,\"pinned\":null,\"account\":{\"id\":\"136453537340198912\",\"username\":\"Dante\",\"acct\":\"dante\",\"display_name\":\"Dante\",\"locked\":false,\"created_at\":\"2020-02-21T12:57:38.000000Z\",\"followers_count\":3,\"following_count\":4,\"statuses_count\":1,\"note\":\"\",\"url\":\"https:\\/\\/pixelfed.de\\/dante\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false},\"media_attachments\":[{\"id\":\"16583\",\"type\":\"image\",\"url\":\"https:\\/\\/pixelfed.de\\/storage\\/m\\/113a3e2124a33b1f5511e531953f5ee48456e0c7\\/0fa8bbe19cc23442034913a7c97fbe4527c1d63a\\/vs2vouJ86OvzxhK9ewhPlfPf4Y9IoQ5CHfiBIqad.jpeg\",\"remote_url\":null,\"preview_url\":\"https:\\/\\/pixelfed.de\\/storage\\/m\\/113a3e2124a33b1f5511e531953f5ee48456e0c7\\/0fa8bbe19cc23442034913a7c97fbe4527c1d63a\\/vs2vouJ86OvzxhK9ewhPlfPf4Y9IoQ5CHfiBIqad_thumb.jpeg\",\"text_url\":null,\"meta\":null,\"description\":null}]}},{\"id\":\"45944\",\"type\":\"follow\",\"created_at\":\"2020-03-15T14:49:11.000000Z\",\"account\":{\"id\":\"136800034732773376\",\"username\":\"Dobios\",\"acct\":\"Dobios\",\"display_name\":\"Andrew Dobis\",\"locked\":false,\"created_at\":\"2020-02-22T11:54:29.000000Z\",\"followers_count\":2,\"following_count\":1,\"statuses_count\":0,\"note\":\"\",\"url\":\"https:\\/\\/pixelfed.de\\/Dobios\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false}},{\"id\":\"45942\",\"type\":\"reblog\",\"created_at\":\"2020-03-15T14:41:04.000000Z\",\"account\":{\"id\":\"144813993922531328\",\"username\":\"Clement\",\"acct\":\"Clement\",\"display_name\":\"Andrea\",\"locked\":false,\"created_at\":\"2020-03-15T14:39:06.000000Z\",\"followers_count\":0,\"following_count\":2,\"statuses_count\":0,\"note\":\"\",\"url\":\"https:\\/\\/pixelfed.de\\/Clement\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false},\"status\":{\"id\":\"144814478708576256\",\"uri\":\"https:\\/\\/pixelfed.de\\/p\\/Clement\\/144814478708576256\",\"url\":\"https:\\/\\/pixelfed.de\\/p\\/Clement\\/144814478708576256\",\"in_reply_to_id\":null,\"in_reply_to_account_id\":136453537340198912,\"reblog\":null,\"content\":\"\",\"created_at\":\"2020-03-15T14:41:02.000000Z\",\"emojis\":[],\"replies_count\":0,\"reblogs_count\":0,\"favourites_count\":0,\"reblogged\":null,\"favourited\":null,\"muted\":null,\"sensitive\":false,\"spoiler_text\":\"\",\"visibility\":\"public\",\"mentions\":[],\"tags\":[],\"card\":null,\"poll\":null,\"application\":{\"name\":\"web\",\"website\":null},\"language\":null,\"pinned\":null,\"account\":{\"id\":\"144813993922531328\",\"username\":\"Clement\",\"acct\":\"Clement\",\"display_name\":\"Andrea\",\"locked\":false,\"created_at\":\"2020-03-15T14:39:06.000000Z\",\"followers_count\":0,\"following_count\":2,\"statuses_count\":0,\"note\":\"\",\"url\":\"https:\\/\\/pixelfed.de\\/Clement\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false}}},{\"id\":\"45941\",\"type\":\"mention\",\"created_at\":\"2020-03-15T14:40:52.000000Z\",\"account\":{\"id\":\"144813993922531328\",\"username\":\"Clement\",\"acct\":\"Clement\",\"display_name\":\"Andrea\",\"locked\":false,\"created_at\":\"2020-03-15T14:39:06.000000Z\",\"followers_count\":0,\"following_count\":2,\"statuses_count\":0,\"note\":\"\",\"url\":\"https:\\/\\/pixelfed.de\\/Clement\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false},\"status\":{\"id\":\"144814428691501056\",\"uri\":\"https:\\/\\/pixelfed.de\\/p\\/Clement\\/144814428691501056\",\"url\":\"https:\\/\\/pixelfed.de\\/p\\/Clement\\/144814428691501056\",\"in_reply_to_id\":144456497894658048,\"in_reply_to_account_id\":136453537340198912,\"reblog\":null,\"content\":\"@dante<\\/a> I identify to this pic.\",\"created_at\":\"2020-03-15T14:40:50.000000Z\",\"emojis\":[],\"replies_count\":0,\"reblogs_count\":0,\"favourites_count\":1,\"reblogged\":null,\"favourited\":null,\"muted\":null,\"sensitive\":false,\"spoiler_text\":\"\",\"visibility\":\"public\",\"mentions\":[{\"id\":\"136453537340198912\",\"url\":\"https:\\/\\/pixelfed.de\\/dante\",\"username\":\"dante\",\"acct\":\"dante\"}],\"tags\":[],\"card\":null,\"poll\":null,\"application\":{\"name\":\"web\",\"website\":null},\"language\":null,\"pinned\":null,\"account\":{\"id\":\"144813993922531328\",\"username\":\"Clement\",\"acct\":\"Clement\",\"display_name\":\"Andrea\",\"locked\":false,\"created_at\":\"2020-03-15T14:39:06.000000Z\",\"followers_count\":0,\"following_count\":2,\"statuses_count\":0,\"note\":\"\",\"url\":\"https:\\/\\/pixelfed.de\\/Clement\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false}}},{\"id\":\"45940\",\"type\":\"favourite\",\"created_at\":\"2020-03-15T14:40:22.000000Z\",\"account\":{\"id\":\"144813993922531328\",\"username\":\"Clement\",\"acct\":\"Clement\",\"display_name\":\"Andrea\",\"locked\":false,\"created_at\":\"2020-03-15T14:39:06.000000Z\",\"followers_count\":0,\"following_count\":2,\"statuses_count\":0,\"note\":\"\",\"url\":\"https:\\/\\/pixelfed.de\\/Clement\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false},\"status\":{\"id\":\"144456497894658048\",\"uri\":\"https:\\/\\/pixelfed.de\\/p\\/dante\\/144456497894658048\",\"url\":\"https:\\/\\/pixelfed.de\\/p\\/dante\\/144456497894658048\",\"in_reply_to_id\":null,\"in_reply_to_account_id\":null,\"reblog\":null,\"content\":\"Saturn V launch\",\"created_at\":\"2020-03-14T14:58:32.000000Z\",\"emojis\":[],\"replies_count\":0,\"reblogs_count\":1,\"favourites_count\":6,\"reblogged\":null,\"favourited\":null,\"muted\":null,\"sensitive\":false,\"spoiler_text\":\"\",\"visibility\":\"public\",\"mentions\":[],\"tags\":[],\"card\":null,\"poll\":null,\"application\":{\"name\":\"web\",\"website\":null},\"language\":null,\"pinned\":null,\"account\":{\"id\":\"136453537340198912\",\"username\":\"dante\",\"acct\":\"dante\",\"display_name\":\"Dante\",\"locked\":false,\"created_at\":\"2020-02-21T12:57:38.000000Z\",\"followers_count\":3,\"following_count\":4,\"statuses_count\":1,\"note\":\"\",\"url\":\"https:\\/\\/pixelfed.de\\/dante\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false},\"media_attachments\":[{\"id\":\"16583\",\"type\":\"image\",\"url\":\"https:\\/\\/pixelfed.de\\/storage\\/m\\/113a3e2124a33b1f5511e531953f5ee48456e0c7\\/0fa8bbe19cc23442034913a7c97fbe4527c1d63a\\/vs2vouJ86OvzxhK9ewhPlfPf4Y9IoQ5CHfiBIqad.jpeg\",\"remote_url\":null,\"preview_url\":\"https:\\/\\/pixelfed.de\\/storage\\/m\\/113a3e2124a33b1f5511e531953f5ee48456e0c7\\/0fa8bbe19cc23442034913a7c97fbe4527c1d63a\\/vs2vouJ86OvzxhK9ewhPlfPf4Y9IoQ5CHfiBIqad_thumb.jpeg\",\"text_url\":null,\"meta\":null,\"description\":null}]}},{\"id\":\"45939\",\"type\":\"follow\",\"created_at\":\"2020-03-15T14:40:12.000000Z\",\"account\":{\"id\":\"144813993922531328\",\"username\":\"Clement\",\"acct\":\"Clement\",\"display_name\":\"Andrea\",\"locked\":false,\"created_at\":\"2020-03-15T14:39:06.000000Z\",\"followers_count\":0,\"following_count\":2,\"statuses_count\":0,\"note\":\"\",\"url\":\"https:\\/\\/pixelfed.de\\/Clement\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false}},{\"id\":\"45804\",\"type\":\"favourite\",\"created_at\":\"2020-03-15T02:22:47.000000Z\",\"account\":{\"id\":\"131984031779786752\",\"username\":\"joska\",\"acct\":\"joska\",\"display_name\":\"jxzk\",\"locked\":false,\"created_at\":\"2020-02-09T04:57:25.000000Z\",\"followers_count\":3,\"following_count\":2,\"statuses_count\":82,\"note\":\"Feliz :D\",\"url\":\"https:\\/\\/pixelfed.de\\/joska\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/013\\/198\\/403\\/177\\/978\\/675\\/2\\/zhytNrT3ij5cHBXX1mJv_avatar.jpeg?v=4fc82b26aecb47d2868c4efbe3581732a3e7cbcc6c2efb32062c08170a05eeb8\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/013\\/198\\/403\\/177\\/978\\/675\\/2\\/zhytNrT3ij5cHBXX1mJv_avatar.jpeg?v=4fc82b26aecb47d2868c4efbe3581732a3e7cbcc6c2efb32062c08170a05eeb8\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false},\"status\":{\"id\":\"144456497894658048\",\"uri\":\"https:\\/\\/pixelfed.de\\/p\\/dante\\/144456497894658048\",\"url\":\"https:\\/\\/pixelfed.de\\/p\\/dante\\/144456497894658048\",\"in_reply_to_id\":null,\"in_reply_to_account_id\":null,\"reblog\":null,\"content\":\"Saturn V launch\",\"created_at\":\"2020-03-14T14:58:32.000000Z\",\"emojis\":[],\"replies_count\":0,\"reblogs_count\":1,\"favourites_count\":6,\"reblogged\":null,\"favourited\":null,\"muted\":null,\"sensitive\":false,\"spoiler_text\":\"\",\"visibility\":\"public\",\"mentions\":[],\"tags\":[],\"card\":null,\"poll\":null,\"application\":{\"name\":\"web\",\"website\":null},\"language\":null,\"pinned\":null,\"account\":{\"id\":\"136453537340198912\",\"username\":\"dante\",\"acct\":\"dante\",\"display_name\":\"Dante\",\"locked\":false,\"created_at\":\"2020-02-21T12:57:38.000000Z\",\"followers_count\":3,\"following_count\":4,\"statuses_count\":1,\"note\":\"\",\"url\":\"https:\\/\\/pixelfed.de\\/dante\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false},\"media_attachments\":[{\"id\":\"16583\",\"type\":\"image\",\"url\":\"https:\\/\\/pixelfed.de\\/storage\\/m\\/113a3e2124a33b1f5511e531953f5ee48456e0c7\\/0fa8bbe19cc23442034913a7c97fbe4527c1d63a\\/vs2vouJ86OvzxhK9ewhPlfPf4Y9IoQ5CHfiBIqad.jpeg\",\"remote_url\":null,\"preview_url\":\"https:\\/\\/pixelfed.de\\/storage\\/m\\/113a3e2124a33b1f5511e531953f5ee48456e0c7\\/0fa8bbe19cc23442034913a7c97fbe4527c1d63a\\/vs2vouJ86OvzxhK9ewhPlfPf4Y9IoQ5CHfiBIqad_thumb.jpeg\",\"text_url\":null,\"meta\":null,\"description\":null}]}},{\"id\":\"45783\",\"type\":\"favourite\",\"created_at\":\"2020-03-15T00:45:53.000000Z\",\"account\":{\"id\":\"139939422090170368\",\"username\":\"DrMsch\",\"acct\":\"DrMsch\",\"display_name\":\"Mische\",\"locked\":false,\"created_at\":\"2020-03-02T03:49:18.000000Z\",\"followers_count\":13,\"following_count\":21,\"statuses_count\":9,\"note\":\"TelefonFotos und Malereien von DerMische\",\"url\":\"https:\\/\\/pixelfed.de\\/DrMsch\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/013\\/993\\/942\\/209\\/017\\/036\\/8\\/xQUOq3tBNgOhFItKMZ56_avatar.jpeg?v=4fc82b26aecb47d2868c4efbe3581732a3e7cbcc6c2efb32062c08170a05eeb8\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/013\\/993\\/942\\/209\\/017\\/036\\/8\\/xQUOq3tBNgOhFItKMZ56_avatar.jpeg?v=4fc82b26aecb47d2868c4efbe3581732a3e7cbcc6c2efb32062c08170a05eeb8\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false},\"status\":{\"id\":\"144456497894658048\",\"uri\":\"https:\\/\\/pixelfed.de\\/p\\/dante\\/144456497894658048\",\"url\":\"https:\\/\\/pixelfed.de\\/p\\/dante\\/144456497894658048\",\"in_reply_to_id\":null,\"in_reply_to_account_id\":null,\"reblog\":null,\"content\":\"Saturn V launch\",\"created_at\":\"2020-03-14T14:58:32.000000Z\",\"emojis\":[],\"replies_count\":0,\"reblogs_count\":1,\"favourites_count\":6,\"reblogged\":null,\"favourited\":null,\"muted\":null,\"sensitive\":false,\"spoiler_text\":\"\",\"visibility\":\"public\",\"mentions\":[],\"tags\":[],\"card\":null,\"poll\":null,\"application\":{\"name\":\"web\",\"website\":null},\"language\":null,\"pinned\":null,\"account\":{\"id\":\"136453537340198912\",\"username\":\"dante\",\"acct\":\"dante\",\"display_name\":\"Dante\",\"locked\":false,\"created_at\":\"2020-02-21T12:57:38.000000Z\",\"followers_count\":3,\"following_count\":4,\"statuses_count\":1,\"note\":\"\",\"url\":\"https:\\/\\/pixelfed.de\\/dante\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false},\"media_attachments\":[{\"id\":\"16583\",\"type\":\"image\",\"url\":\"https:\\/\\/pixelfed.de\\/storage\\/m\\/113a3e2124a33b1f5511e531953f5ee48456e0c7\\/0fa8bbe19cc23442034913a7c97fbe4527c1d63a\\/vs2vouJ86OvzxhK9ewhPlfPf4Y9IoQ5CHfiBIqad.jpeg\",\"remote_url\":null,\"preview_url\":\"https:\\/\\/pixelfed.de\\/storage\\/m\\/113a3e2124a33b1f5511e531953f5ee48456e0c7\\/0fa8bbe19cc23442034913a7c97fbe4527c1d63a\\/vs2vouJ86OvzxhK9ewhPlfPf4Y9IoQ5CHfiBIqad_thumb.jpeg\",\"text_url\":null,\"meta\":null,\"description\":null}]}},{\"id\":\"45768\",\"type\":\"favourite\",\"created_at\":\"2020-03-14T22:43:18.000000Z\",\"account\":{\"id\":\"139819612522024960\",\"username\":\"vitorpires\",\"acct\":\"vitorpires\",\"display_name\":\"Vitor Pires\",\"locked\":false,\"created_at\":\"2020-03-01T19:53:13.000000Z\",\"followers_count\":20,\"following_count\":8,\"statuses_count\":42,\"note\":\"photography\\/graphic design\\/desktop publishing\\/illustration\\/3D animation\\/video\\/content writing\\/teaching\\/woodworking\\/luthier\",\"url\":\"https:\\/\\/pixelfed.de\\/vitorpires\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/013\\/981\\/961\\/252\\/202\\/496\\/0\\/2HB6Gs2m5NaSys7W5ikG_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/013\\/981\\/961\\/252\\/202\\/496\\/0\\/2HB6Gs2m5NaSys7W5ikG_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false},\"status\":{\"id\":\"144456497894658048\",\"uri\":\"https:\\/\\/pixelfed.de\\/p\\/dante\\/144456497894658048\",\"url\":\"https:\\/\\/pixelfed.de\\/p\\/dante\\/144456497894658048\",\"in_reply_to_id\":null,\"in_reply_to_account_id\":null,\"reblog\":null,\"content\":\"Saturn V launch\",\"created_at\":\"2020-03-14T14:58:32.000000Z\",\"emojis\":[],\"replies_count\":0,\"reblogs_count\":1,\"favourites_count\":6,\"reblogged\":null,\"favourited\":null,\"muted\":null,\"sensitive\":false,\"spoiler_text\":\"\",\"visibility\":\"public\",\"mentions\":[],\"tags\":[],\"card\":null,\"poll\":null,\"application\":{\"name\":\"web\",\"website\":null},\"language\":null,\"pinned\":null,\"account\":{\"id\":\"136453537340198912\",\"username\":\"dante\",\"acct\":\"dante\",\"display_name\":\"Dante\",\"locked\":false,\"created_at\":\"2020-02-21T12:57:38.000000Z\",\"followers_count\":3,\"following_count\":4,\"statuses_count\":1,\"note\":\"\",\"url\":\"https:\\/\\/pixelfed.de\\/dante\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false},\"media_attachments\":[{\"id\":\"16583\",\"type\":\"image\",\"url\":\"https:\\/\\/pixelfed.de\\/storage\\/m\\/113a3e2124a33b1f5511e531953f5ee48456e0c7\\/0fa8bbe19cc23442034913a7c97fbe4527c1d63a\\/vs2vouJ86OvzxhK9ewhPlfPf4Y9IoQ5CHfiBIqad.jpeg\",\"remote_url\":null,\"preview_url\":\"https:\\/\\/pixelfed.de\\/storage\\/m\\/113a3e2124a33b1f5511e531953f5ee48456e0c7\\/0fa8bbe19cc23442034913a7c97fbe4527c1d63a\\/vs2vouJ86OvzxhK9ewhPlfPf4Y9IoQ5CHfiBIqad_thumb.jpeg\",\"text_url\":null,\"meta\":null,\"description\":null}]}},{\"id\":\"45723\",\"type\":\"favourite\",\"created_at\":\"2020-03-14T15:01:49.000000Z\",\"account\":{\"id\":\"79574199701737472\",\"username\":\"Spaziergaenger\",\"acct\":\"Spaziergaenger\",\"display_name\":\"anonymous\",\"locked\":false,\"created_at\":\"2019-09-17T13:59:27.000000Z\",\"followers_count\":40,\"following_count\":0,\"statuses_count\":894,\"note\":\"\",\"url\":\"https:\\/\\/pixelfed.de\\/Spaziergaenger\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/007\\/957\\/419\\/970\\/173\\/747\\/2\\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/007\\/957\\/419\\/970\\/173\\/747\\/2\\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false},\"status\":{\"id\":\"144456497894658048\",\"uri\":\"https:\\/\\/pixelfed.de\\/p\\/dante\\/144456497894658048\",\"url\":\"https:\\/\\/pixelfed.de\\/p\\/dante\\/144456497894658048\",\"in_reply_to_id\":null,\"in_reply_to_account_id\":null,\"reblog\":null,\"content\":\"Saturn V launch\",\"created_at\":\"2020-03-14T14:58:32.000000Z\",\"emojis\":[],\"replies_count\":0,\"reblogs_count\":1,\"favourites_count\":6,\"reblogged\":null,\"favourited\":null,\"muted\":null,\"sensitive\":false,\"spoiler_text\":\"\",\"visibility\":\"public\",\"mentions\":[],\"tags\":[],\"card\":null,\"poll\":null,\"application\":{\"name\":\"web\",\"website\":null},\"language\":null,\"pinned\":null,\"account\":{\"id\":\"136453537340198912\",\"username\":\"dante\",\"acct\":\"dante\",\"display_name\":\"Dante\",\"locked\":false,\"created_at\":\"2020-02-21T12:57:38.000000Z\",\"followers_count\":3,\"following_count\":4,\"statuses_count\":1,\"note\":\"\",\"url\":\"https:\\/\\/pixelfed.de\\/dante\",\"avatar\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"avatar_static\":\"https:\\/\\/pixelfed.de\\/storage\\/avatars\\/default.png?v=5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9\",\"header\":\"\",\"header_static\":\"\",\"emojis\":[],\"moved\":null,\"fields\":null,\"bot\":false,\"software\":\"pixelfed\",\"is_admin\":false},\"media_attachments\":[{\"id\":\"16583\",\"type\":\"image\",\"url\":\"https:\\/\\/pixelfed.de\\/storage\\/m\\/113a3e2124a33b1f5511e531953f5ee48456e0c7\\/0fa8bbe19cc23442034913a7c97fbe4527c1d63a\\/vs2vouJ86OvzxhK9ewhPlfPf4Y9IoQ5CHfiBIqad.jpeg\",\"remote_url\":null,\"preview_url\":\"https:\\/\\/pixelfed.de\\/storage\\/m\\/113a3e2124a33b1f5511e531953f5ee48456e0c7\\/0fa8bbe19cc23442034913a7c97fbe4527c1d63a\\/vs2vouJ86OvzxhK9ewhPlfPf4Y9IoQ5CHfiBIqad_thumb.jpeg\",\"text_url\":null,\"meta\":null,\"description\":null}]}}]"
-
+ private val accountStatusesJson = """[{"id":"153848799696130048","uri":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/153848799696130048","url":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/153848799696130048","in_reply_to_id":null,"in_reply_to_account_id":null,"reblog":null,"content":"2017-05-28 VG Bad-Kreuznach Wandertag
\n
\nn\u00e4her geht es an Neu-Bamberg und den dritten Kontrollpunkt heran","created_at":"2020-04-09T13:00:12.000000Z","emojis":[],"replies_count":0,"reblogs_count":0,"favourites_count":1,"reblogged":null,"favourited":null,"muted":null,"sensitive":false,"spoiler_text":"","visibility":"public","mentions":[],"tags":[],"card":null,"poll":null,"application":{"name":"web","website":null},"language":null,"pinned":null,"account":{"id":"79574199701737472","username":"Spaziergaenger","acct":"Spaziergaenger","display_name":"anonymous","locked":false,"created_at":"2019-09-17T13:59:27.000000Z","followers_count":43,"following_count":0,"statuses_count":966,"note":"","url":"https:\/\/pixelfed.de\/Spaziergaenger","avatar":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","avatar_static":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","header":"","header_static":"","emojis":[],"moved":null,"fields":null,"bot":false,"software":"pixelfed","is_admin":false},"media_attachments":[{"id":"18521","type":"image","url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/IX5g6bLSCB4lpp0wTr6HKj4mYEpNUhgrjv50InJ3.jpeg","remote_url":null,"preview_url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/IX5g6bLSCB4lpp0wTr6HKj4mYEpNUhgrjv50InJ3_thumb.jpeg","text_url":null,"meta":null,"description":null}]},{"id":"153848420002566144","uri":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/153848420002566144","url":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/153848420002566144","in_reply_to_id":null,"in_reply_to_account_id":null,"reblog":null,"content":"2017-05-28 VG Bad-Kreuznach Wandertag
\n
\nimmer wieder Wein und im Hintergrund der Steinbruch","created_at":"2020-04-09T12:58:41.000000Z","emojis":[],"replies_count":0,"reblogs_count":0,"favourites_count":1,"reblogged":null,"favourited":null,"muted":null,"sensitive":false,"spoiler_text":"","visibility":"public","mentions":[],"tags":[],"card":null,"poll":null,"application":{"name":"web","website":null},"language":null,"pinned":null,"account":{"id":"79574199701737472","username":"Spaziergaenger","acct":"Spaziergaenger","display_name":"anonymous","locked":false,"created_at":"2019-09-17T13:59:27.000000Z","followers_count":43,"following_count":0,"statuses_count":966,"note":"","url":"https:\/\/pixelfed.de\/Spaziergaenger","avatar":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","avatar_static":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","header":"","header_static":"","emojis":[],"moved":null,"fields":null,"bot":false,"software":"pixelfed","is_admin":false},"media_attachments":[{"id":"18520","type":"image","url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/g0ScH8shkytKjS9fask1CZHj0TMzWhbgJALApt5u.jpeg","remote_url":null,"preview_url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/g0ScH8shkytKjS9fask1CZHj0TMzWhbgJALApt5u_thumb.jpeg","text_url":null,"meta":null,"description":null}]},{"id":"153848196064481280","uri":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/153848196064481280","url":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/153848196064481280","in_reply_to_id":null,"in_reply_to_account_id":null,"reblog":null,"content":"2017-05-28 VG Bad-Kreuznach Wandertag
\n
\ndas Ende der Steigung ist absehbar","created_at":"2020-04-09T12:57:48.000000Z","emojis":[],"replies_count":0,"reblogs_count":0,"favourites_count":0,"reblogged":null,"favourited":null,"muted":null,"sensitive":false,"spoiler_text":"","visibility":"public","mentions":[],"tags":[],"card":null,"poll":null,"application":{"name":"web","website":null},"language":null,"pinned":null,"account":{"id":"79574199701737472","username":"Spaziergaenger","acct":"Spaziergaenger","display_name":"anonymous","locked":false,"created_at":"2019-09-17T13:59:27.000000Z","followers_count":43,"following_count":0,"statuses_count":966,"note":"","url":"https:\/\/pixelfed.de\/Spaziergaenger","avatar":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","avatar_static":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","header":"","header_static":"","emojis":[],"moved":null,"fields":null,"bot":false,"software":"pixelfed","is_admin":false},"media_attachments":[{"id":"18518","type":"image","url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/xLvyeeywOdeUTxYW03caxRXzNr4bldmAB1JUXUzv.jpeg","remote_url":null,"preview_url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/xLvyeeywOdeUTxYW03caxRXzNr4bldmAB1JUXUzv_thumb.jpeg","text_url":null,"meta":null,"description":null}]},{"id":"153446932994461696","uri":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/153446932994461696","url":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/153446932994461696","in_reply_to_id":null,"in_reply_to_account_id":null,"reblog":null,"content":"2017-05-28 VG Bad-Kreuznach Wandertag
\n
\nweiter gehts es steil den Berg hinauf","created_at":"2020-04-08T10:23:19.000000Z","emojis":[],"replies_count":0,"reblogs_count":0,"favourites_count":0,"reblogged":null,"favourited":null,"muted":null,"sensitive":false,"spoiler_text":"","visibility":"public","mentions":[],"tags":[],"card":null,"poll":null,"application":{"name":"web","website":null},"language":null,"pinned":null,"account":{"id":"79574199701737472","username":"Spaziergaenger","acct":"Spaziergaenger","display_name":"anonymous","locked":false,"created_at":"2019-09-17T13:59:27.000000Z","followers_count":43,"following_count":0,"statuses_count":966,"note":"","url":"https:\/\/pixelfed.de\/Spaziergaenger","avatar":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","avatar_static":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","header":"","header_static":"","emojis":[],"moved":null,"fields":null,"bot":false,"software":"pixelfed","is_admin":false},"media_attachments":[{"id":"18421","type":"image","url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/VkG4AxsEE8gyWqUxprpna6LNSwRtKjW6A8yoZijI.jpeg","remote_url":null,"preview_url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/VkG4AxsEE8gyWqUxprpna6LNSwRtKjW6A8yoZijI_thumb.jpeg","text_url":null,"meta":null,"description":null}]},{"id":"153446615137521664","uri":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/153446615137521664","url":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/153446615137521664","in_reply_to_id":null,"in_reply_to_account_id":null,"reblog":null,"content":"2017-05-28 VG Bad-Kreuznach Wandertag
\n
\nUnd hier gibt es neben dem zweiten Stempel auch k\u00fchle Getr\u00e4nke und Reibekuchen zum Sattessen","created_at":"2020-04-08T10:22:03.000000Z","emojis":[],"replies_count":0,"reblogs_count":0,"favourites_count":0,"reblogged":null,"favourited":null,"muted":null,"sensitive":false,"spoiler_text":"","visibility":"public","mentions":[],"tags":[],"card":null,"poll":null,"application":{"name":"web","website":null},"language":null,"pinned":null,"account":{"id":"79574199701737472","username":"Spaziergaenger","acct":"Spaziergaenger","display_name":"anonymous","locked":false,"created_at":"2019-09-17T13:59:27.000000Z","followers_count":43,"following_count":0,"statuses_count":966,"note":"","url":"https:\/\/pixelfed.de\/Spaziergaenger","avatar":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","avatar_static":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","header":"","header_static":"","emojis":[],"moved":null,"fields":null,"bot":false,"software":"pixelfed","is_admin":false},"media_attachments":[{"id":"18420","type":"image","url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/BhSqEKyy6iBlJGnrHpvjp2ZCrmCnepM0E3c83vvf.jpeg","remote_url":null,"preview_url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/BhSqEKyy6iBlJGnrHpvjp2ZCrmCnepM0E3c83vvf_thumb.jpeg","text_url":null,"meta":null,"description":null}]},{"id":"153446167173271552","uri":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/153446167173271552","url":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/153446167173271552","in_reply_to_id":null,"in_reply_to_account_id":null,"reblog":null,"content":"2017-05-28 VG Bad-Kreuznach Wandertag
\n
\nDer zweite Kontrollpunkt: das sogenannte Wingertsh\u00e4uschen","created_at":"2020-04-08T10:20:17.000000Z","emojis":[],"replies_count":0,"reblogs_count":0,"favourites_count":4,"reblogged":null,"favourited":null,"muted":null,"sensitive":false,"spoiler_text":"","visibility":"public","mentions":[],"tags":[],"card":null,"poll":null,"application":{"name":"web","website":null},"language":null,"pinned":null,"account":{"id":"79574199701737472","username":"Spaziergaenger","acct":"Spaziergaenger","display_name":"anonymous","locked":false,"created_at":"2019-09-17T13:59:27.000000Z","followers_count":43,"following_count":0,"statuses_count":966,"note":"","url":"https:\/\/pixelfed.de\/Spaziergaenger","avatar":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","avatar_static":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","header":"","header_static":"","emojis":[],"moved":null,"fields":null,"bot":false,"software":"pixelfed","is_admin":false},"media_attachments":[{"id":"18419","type":"image","url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/iPjOwRResYI4BZxSNV7ZNpTsLz7Wna4IRHcu25dz.jpeg","remote_url":null,"preview_url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/iPjOwRResYI4BZxSNV7ZNpTsLz7Wna4IRHcu25dz_thumb.jpeg","text_url":null,"meta":null,"description":null}]},{"id":"153053485812813824","uri":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/153053485812813824","url":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/153053485812813824","in_reply_to_id":null,"in_reply_to_account_id":null,"reblog":null,"content":"2017-05-28 VG Bad-Kreuznach Wandertag
\n
\nBlick auf die Kreisstra\u00dfe 88","created_at":"2020-04-07T08:19:54.000000Z","emojis":[],"replies_count":0,"reblogs_count":0,"favourites_count":2,"reblogged":null,"favourited":null,"muted":null,"sensitive":false,"spoiler_text":"","visibility":"public","mentions":[],"tags":[],"card":null,"poll":null,"application":{"name":"web","website":null},"language":null,"pinned":null,"account":{"id":"79574199701737472","username":"Spaziergaenger","acct":"Spaziergaenger","display_name":"anonymous","locked":false,"created_at":"2019-09-17T13:59:27.000000Z","followers_count":43,"following_count":0,"statuses_count":966,"note":"","url":"https:\/\/pixelfed.de\/Spaziergaenger","avatar":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","avatar_static":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","header":"","header_static":"","emojis":[],"moved":null,"fields":null,"bot":false,"software":"pixelfed","is_admin":false},"media_attachments":[{"id":"18291","type":"image","url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/GdQiZxDAB99NYbq0QpeW4GoNDzhAGuxcylOhWaBF.jpeg","remote_url":null,"preview_url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/GdQiZxDAB99NYbq0QpeW4GoNDzhAGuxcylOhWaBF_thumb.jpeg","text_url":null,"meta":null,"description":null}]},{"id":"153053256745095168","uri":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/153053256745095168","url":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/153053256745095168","in_reply_to_id":null,"in_reply_to_account_id":null,"reblog":null,"content":"2017-05-28 VG Bad-Kreuznach Wandertag
\n
\nendlich Schatten","created_at":"2020-04-07T08:18:59.000000Z","emojis":[],"replies_count":0,"reblogs_count":0,"favourites_count":3,"reblogged":null,"favourited":null,"muted":null,"sensitive":false,"spoiler_text":"","visibility":"public","mentions":[],"tags":[],"card":null,"poll":null,"application":{"name":"web","website":null},"language":null,"pinned":null,"account":{"id":"79574199701737472","username":"Spaziergaenger","acct":"Spaziergaenger","display_name":"anonymous","locked":false,"created_at":"2019-09-17T13:59:27.000000Z","followers_count":43,"following_count":0,"statuses_count":966,"note":"","url":"https:\/\/pixelfed.de\/Spaziergaenger","avatar":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","avatar_static":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","header":"","header_static":"","emojis":[],"moved":null,"fields":null,"bot":false,"software":"pixelfed","is_admin":false},"media_attachments":[{"id":"18290","type":"image","url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/6TIe7Rj5vLFwp7VIRjLapnLqOzQ0WCtfnaVni9QS.jpeg","remote_url":null,"preview_url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/6TIe7Rj5vLFwp7VIRjLapnLqOzQ0WCtfnaVni9QS_thumb.jpeg","text_url":null,"meta":null,"description":null}]},{"id":"153052983712681984","uri":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/153052983712681984","url":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/153052983712681984","in_reply_to_id":null,"in_reply_to_account_id":null,"reblog":null,"content":"2017-05-28 VG Bad-Kreuznach Wandertag
\n
\nDer Wald kommt immer n\u00e4her","created_at":"2020-04-07T08:17:54.000000Z","emojis":[],"replies_count":0,"reblogs_count":0,"favourites_count":4,"reblogged":null,"favourited":null,"muted":null,"sensitive":false,"spoiler_text":"","visibility":"public","mentions":[],"tags":[],"card":null,"poll":null,"application":{"name":"web","website":null},"language":null,"pinned":null,"account":{"id":"79574199701737472","username":"Spaziergaenger","acct":"Spaziergaenger","display_name":"anonymous","locked":false,"created_at":"2019-09-17T13:59:27.000000Z","followers_count":43,"following_count":0,"statuses_count":966,"note":"","url":"https:\/\/pixelfed.de\/Spaziergaenger","avatar":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","avatar_static":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","header":"","header_static":"","emojis":[],"moved":null,"fields":null,"bot":false,"software":"pixelfed","is_admin":false},"media_attachments":[{"id":"18285","type":"image","url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/N0Dmh4lwjTcI8ACNqnxsS2cuWN5ZvusnZAt8XauE.jpeg","remote_url":null,"preview_url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/N0Dmh4lwjTcI8ACNqnxsS2cuWN5ZvusnZAt8XauE_thumb.jpeg","text_url":null,"meta":null,"description":null}]},{"id":"152657825544409088","uri":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/152657825544409088","url":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/152657825544409088","in_reply_to_id":null,"in_reply_to_account_id":null,"reblog":null,"content":"2017-05-28 VG Bad-Kreuznach Wandertag
\n
\nnoch immer bei glei\u00dfender Sonne auf offenem Feld kommt Wald in Sicht","created_at":"2020-04-06T06:07:41.000000Z","emojis":[],"replies_count":0,"reblogs_count":0,"favourites_count":3,"reblogged":null,"favourited":null,"muted":null,"sensitive":false,"spoiler_text":"","visibility":"public","mentions":[],"tags":[],"card":null,"poll":null,"application":{"name":"web","website":null},"language":null,"pinned":null,"account":{"id":"79574199701737472","username":"Spaziergaenger","acct":"Spaziergaenger","display_name":"anonymous","locked":false,"created_at":"2019-09-17T13:59:27.000000Z","followers_count":43,"following_count":0,"statuses_count":966,"note":"","url":"https:\/\/pixelfed.de\/Spaziergaenger","avatar":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","avatar_static":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","header":"","header_static":"","emojis":[],"moved":null,"fields":null,"bot":false,"software":"pixelfed","is_admin":false},"media_attachments":[{"id":"18180","type":"image","url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/jgnP7gR3rw37yCnF1T5379krsZhRzh6JHiASINSP.jpeg","remote_url":null,"preview_url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/jgnP7gR3rw37yCnF1T5379krsZhRzh6JHiASINSP_thumb.jpeg","text_url":null,"meta":null,"description":null}]},{"id":"152657278993043456","uri":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/152657278993043456","url":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/152657278993043456","in_reply_to_id":null,"in_reply_to_account_id":null,"reblog":null,"content":"2017-05-28 VG Bad-Kreuznach Wandertag
\n
\nBlick durch die Zweige auf die historische Kapelle von Hof Iben","created_at":"2020-04-06T06:05:31.000000Z","emojis":[],"replies_count":0,"reblogs_count":0,"favourites_count":2,"reblogged":null,"favourited":null,"muted":null,"sensitive":false,"spoiler_text":"","visibility":"public","mentions":[],"tags":[],"card":null,"poll":null,"application":{"name":"web","website":null},"language":null,"pinned":null,"account":{"id":"79574199701737472","username":"Spaziergaenger","acct":"Spaziergaenger","display_name":"anonymous","locked":false,"created_at":"2019-09-17T13:59:27.000000Z","followers_count":43,"following_count":0,"statuses_count":966,"note":"","url":"https:\/\/pixelfed.de\/Spaziergaenger","avatar":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","avatar_static":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","header":"","header_static":"","emojis":[],"moved":null,"fields":null,"bot":false,"software":"pixelfed","is_admin":false},"media_attachments":[{"id":"18179","type":"image","url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/FyadKaDMpUZkde9cQzrBKbtcAaHKsT4WtDQSnLMg.jpeg","remote_url":null,"preview_url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/FyadKaDMpUZkde9cQzrBKbtcAaHKsT4WtDQSnLMg_thumb.jpeg","text_url":null,"meta":null,"description":null}]},{"id":"152656864235098112","uri":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/152656864235098112","url":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/152656864235098112","in_reply_to_id":null,"in_reply_to_account_id":null,"reblog":null,"content":"2017-05-28 VG Bad-Kreuznach Wandertag
\n
\nimmer weiter \u00fcber offene Felder","created_at":"2020-04-06T06:03:52.000000Z","emojis":[],"replies_count":0,"reblogs_count":0,"favourites_count":4,"reblogged":null,"favourited":null,"muted":null,"sensitive":false,"spoiler_text":"","visibility":"public","mentions":[],"tags":[],"card":null,"poll":null,"application":{"name":"web","website":null},"language":null,"pinned":null,"account":{"id":"79574199701737472","username":"Spaziergaenger","acct":"Spaziergaenger","display_name":"anonymous","locked":false,"created_at":"2019-09-17T13:59:27.000000Z","followers_count":43,"following_count":0,"statuses_count":966,"note":"","url":"https:\/\/pixelfed.de\/Spaziergaenger","avatar":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","avatar_static":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","header":"","header_static":"","emojis":[],"moved":null,"fields":null,"bot":false,"software":"pixelfed","is_admin":false},"media_attachments":[{"id":"18178","type":"image","url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/ExqK24a3Ri3Jn7XEodkoAx7kRLJIQPuWaFzx09Sk.jpeg","remote_url":null,"preview_url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/ExqK24a3Ri3Jn7XEodkoAx7kRLJIQPuWaFzx09Sk_thumb.jpeg","text_url":null,"meta":null,"description":null}]},{"id":"152158673148448768","uri":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/152158673148448768","url":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/152158673148448768","in_reply_to_id":null,"in_reply_to_account_id":null,"reblog":null,"content":"2017-05-28 VG Bad-Kreuznach Wandertag
\n
\n... und r\u00fcber nach Neu Bamberg, links der Steinbruch","created_at":"2020-04-04T21:04:14.000000Z","emojis":[],"replies_count":0,"reblogs_count":0,"favourites_count":1,"reblogged":null,"favourited":null,"muted":null,"sensitive":false,"spoiler_text":"","visibility":"public","mentions":[],"tags":[],"card":null,"poll":null,"application":{"name":"web","website":null},"language":null,"pinned":null,"account":{"id":"79574199701737472","username":"Spaziergaenger","acct":"Spaziergaenger","display_name":"anonymous","locked":false,"created_at":"2019-09-17T13:59:27.000000Z","followers_count":43,"following_count":0,"statuses_count":966,"note":"","url":"https:\/\/pixelfed.de\/Spaziergaenger","avatar":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","avatar_static":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","header":"","header_static":"","emojis":[],"moved":null,"fields":null,"bot":false,"software":"pixelfed","is_admin":false},"media_attachments":[{"id":"18106","type":"image","url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/r29IsMP9TUagGBhr8UzRi7Odb83mMJNotEAZxqsS.jpeg","remote_url":null,"preview_url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/r29IsMP9TUagGBhr8UzRi7Odb83mMJNotEAZxqsS_thumb.jpeg","text_url":null,"meta":null,"description":null}]},{"id":"152158370521026560","uri":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/152158370521026560","url":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/152158370521026560","in_reply_to_id":null,"in_reply_to_account_id":null,"reblog":null,"content":"2017-05-28 VG Bad-Kreuznach Wandertag
\n
\nDer Blick zur\u00fcck nach F\u00fcrfeld ...","created_at":"2020-04-04T21:03:02.000000Z","emojis":[],"replies_count":0,"reblogs_count":0,"favourites_count":2,"reblogged":null,"favourited":null,"muted":null,"sensitive":false,"spoiler_text":"","visibility":"public","mentions":[],"tags":[],"card":null,"poll":null,"application":{"name":"web","website":null},"language":null,"pinned":null,"account":{"id":"79574199701737472","username":"Spaziergaenger","acct":"Spaziergaenger","display_name":"anonymous","locked":false,"created_at":"2019-09-17T13:59:27.000000Z","followers_count":43,"following_count":0,"statuses_count":966,"note":"","url":"https:\/\/pixelfed.de\/Spaziergaenger","avatar":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","avatar_static":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","header":"","header_static":"","emojis":[],"moved":null,"fields":null,"bot":false,"software":"pixelfed","is_admin":false},"media_attachments":[{"id":"18105","type":"image","url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/CDMIhBX34DlG3L4clpHQvdPoBpR8MCgIUSy1cnQU.jpeg","remote_url":null,"preview_url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/CDMIhBX34DlG3L4clpHQvdPoBpR8MCgIUSy1cnQU_thumb.jpeg","text_url":null,"meta":null,"description":null}]},{"id":"152157823550230528","uri":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/152157823550230528","url":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/152157823550230528","in_reply_to_id":null,"in_reply_to_account_id":null,"reblog":null,"content":"2017-05-28 VG Bad-Kreuznach Wandertag
\n
\n... bis zum Horizont ...","created_at":"2020-04-04T21:00:52.000000Z","emojis":[],"replies_count":0,"reblogs_count":0,"favourites_count":1,"reblogged":null,"favourited":null,"muted":null,"sensitive":false,"spoiler_text":"","visibility":"public","mentions":[],"tags":[],"card":null,"poll":null,"application":{"name":"web","website":null},"language":null,"pinned":null,"account":{"id":"79574199701737472","username":"Spaziergaenger","acct":"Spaziergaenger","display_name":"anonymous","locked":false,"created_at":"2019-09-17T13:59:27.000000Z","followers_count":43,"following_count":0,"statuses_count":966,"note":"","url":"https:\/\/pixelfed.de\/Spaziergaenger","avatar":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","avatar_static":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","header":"","header_static":"","emojis":[],"moved":null,"fields":null,"bot":false,"software":"pixelfed","is_admin":false},"media_attachments":[{"id":"18104","type":"image","url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/JYBeWD99cXadqo385uZjH98y2Cs1tQ0kun1NH9vd.jpeg","remote_url":null,"preview_url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/JYBeWD99cXadqo385uZjH98y2Cs1tQ0kun1NH9vd_thumb.jpeg","text_url":null,"meta":null,"description":null}]},{"id":"151795147183624192","uri":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/151795147183624192","url":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/151795147183624192","in_reply_to_id":null,"in_reply_to_account_id":null,"reblog":null,"content":"2017-05-28 VG Bad-Kreuznach Wandertag
\n
\nDuch die Weinberge Richtung Hof Iben","created_at":"2020-04-03T20:59:43.000000Z","emojis":[],"replies_count":0,"reblogs_count":0,"favourites_count":1,"reblogged":null,"favourited":null,"muted":null,"sensitive":false,"spoiler_text":"","visibility":"public","mentions":[],"tags":[],"card":null,"poll":null,"application":{"name":"web","website":null},"language":null,"pinned":null,"account":{"id":"79574199701737472","username":"Spaziergaenger","acct":"Spaziergaenger","display_name":"anonymous","locked":false,"created_at":"2019-09-17T13:59:27.000000Z","followers_count":43,"following_count":0,"statuses_count":966,"note":"","url":"https:\/\/pixelfed.de\/Spaziergaenger","avatar":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","avatar_static":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","header":"","header_static":"","emojis":[],"moved":null,"fields":null,"bot":false,"software":"pixelfed","is_admin":false},"media_attachments":[{"id":"18071","type":"image","url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/VUD4ewNlZ7ofpFiO8wG9SEoaG4TbmRBgNtfEkEKw.jpeg","remote_url":null,"preview_url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/VUD4ewNlZ7ofpFiO8wG9SEoaG4TbmRBgNtfEkEKw_thumb.jpeg","text_url":null,"meta":null,"description":null},{"id":"18072","type":"image","url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/2tiRGDebac4DvE3a2djRjCHtaJuspwdyaxiu27JY.jpeg","remote_url":null,"preview_url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/2tiRGDebac4DvE3a2djRjCHtaJuspwdyaxiu27JY_thumb.jpeg","text_url":null,"meta":null,"description":null}]},{"id":"151794839434956800","uri":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/151794839434956800","url":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/151794839434956800","in_reply_to_id":null,"in_reply_to_account_id":null,"reblog":null,"content":"2017-05-28 VG Bad-Kreuznach Wandertag
\n
\nBlick nach S\u00fcden \u00fcber die herrliche Landschaft","created_at":"2020-04-03T20:58:29.000000Z","emojis":[],"replies_count":0,"reblogs_count":0,"favourites_count":1,"reblogged":null,"favourited":null,"muted":null,"sensitive":false,"spoiler_text":"","visibility":"public","mentions":[],"tags":[],"card":null,"poll":null,"application":{"name":"web","website":null},"language":null,"pinned":null,"account":{"id":"79574199701737472","username":"Spaziergaenger","acct":"Spaziergaenger","display_name":"anonymous","locked":false,"created_at":"2019-09-17T13:59:27.000000Z","followers_count":43,"following_count":0,"statuses_count":966,"note":"","url":"https:\/\/pixelfed.de\/Spaziergaenger","avatar":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","avatar_static":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","header":"","header_static":"","emojis":[],"moved":null,"fields":null,"bot":false,"software":"pixelfed","is_admin":false},"media_attachments":[{"id":"18070","type":"image","url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/vdEd5cyW6SMxectXdDVPdMNNt4TNrtERHSRGWc9R.jpeg","remote_url":null,"preview_url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/vdEd5cyW6SMxectXdDVPdMNNt4TNrtERHSRGWc9R_thumb.jpeg","text_url":null,"meta":null,"description":null}]},{"id":"151794394431885312","uri":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/151794394431885312","url":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/151794394431885312","in_reply_to_id":null,"in_reply_to_account_id":null,"reblog":null,"content":"2017-05-28 VG Bad-Kreuznach Wandertag
\n
\nBlick \u00fcber F\u00fcrfeld","created_at":"2020-04-03T20:56:43.000000Z","emojis":[],"replies_count":0,"reblogs_count":0,"favourites_count":4,"reblogged":null,"favourited":null,"muted":null,"sensitive":false,"spoiler_text":"","visibility":"public","mentions":[],"tags":[],"card":null,"poll":null,"application":{"name":"web","website":null},"language":null,"pinned":null,"account":{"id":"79574199701737472","username":"Spaziergaenger","acct":"Spaziergaenger","display_name":"anonymous","locked":false,"created_at":"2019-09-17T13:59:27.000000Z","followers_count":43,"following_count":0,"statuses_count":966,"note":"","url":"https:\/\/pixelfed.de\/Spaziergaenger","avatar":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","avatar_static":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","header":"","header_static":"","emojis":[],"moved":null,"fields":null,"bot":false,"software":"pixelfed","is_admin":false},"media_attachments":[{"id":"18069","type":"image","url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/sGtZi6f3Q9cJfc6cou08otJqBoGCcSlot64yttra.jpeg","remote_url":null,"preview_url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/sGtZi6f3Q9cJfc6cou08otJqBoGCcSlot64yttra_thumb.jpeg","text_url":null,"meta":null,"description":null}]},{"id":"151344455130157056","uri":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/151344455130157056","url":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/151344455130157056","in_reply_to_id":null,"in_reply_to_account_id":null,"reblog":null,"content":"2017-05-28 VG Bad-Kreuznach Wandertag
\n
\nDas Fahrzeug der Veranstaltungsleitung von hinten","created_at":"2020-04-02T15:08:49.000000Z","emojis":[],"replies_count":0,"reblogs_count":0,"favourites_count":2,"reblogged":null,"favourited":null,"muted":null,"sensitive":false,"spoiler_text":"","visibility":"public","mentions":[],"tags":[],"card":null,"poll":null,"application":{"name":"web","website":null},"language":null,"pinned":null,"account":{"id":"79574199701737472","username":"Spaziergaenger","acct":"Spaziergaenger","display_name":"anonymous","locked":false,"created_at":"2019-09-17T13:59:27.000000Z","followers_count":43,"following_count":0,"statuses_count":966,"note":"","url":"https:\/\/pixelfed.de\/Spaziergaenger","avatar":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","avatar_static":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","header":"","header_static":"","emojis":[],"moved":null,"fields":null,"bot":false,"software":"pixelfed","is_admin":false},"media_attachments":[{"id":"17966","type":"image","url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/0bixTrcD8FKkM12kG7k21OzfDDZQIVEyadu7Tv47.jpeg","remote_url":null,"preview_url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/0bixTrcD8FKkM12kG7k21OzfDDZQIVEyadu7Tv47_thumb.jpeg","text_url":null,"meta":null,"description":null}]},{"id":"151343830426324992","uri":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/151343830426324992","url":"https:\/\/pixelfed.de\/p\/Spaziergaenger\/151343830426324992","in_reply_to_id":null,"in_reply_to_account_id":null,"reblog":null,"content":"2017-05-28 VG Bad-Kreuznach Wandertag
\n
\nBlick zur\u00fcck zum Eichelberg","created_at":"2020-04-02T15:06:21.000000Z","emojis":[],"replies_count":0,"reblogs_count":0,"favourites_count":1,"reblogged":null,"favourited":null,"muted":null,"sensitive":false,"spoiler_text":"","visibility":"public","mentions":[],"tags":[],"card":null,"poll":null,"application":{"name":"web","website":null},"language":null,"pinned":null,"account":{"id":"79574199701737472","username":"Spaziergaenger","acct":"Spaziergaenger","display_name":"anonymous","locked":false,"created_at":"2019-09-17T13:59:27.000000Z","followers_count":43,"following_count":0,"statuses_count":966,"note":"","url":"https:\/\/pixelfed.de\/Spaziergaenger","avatar":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","avatar_static":"https:\/\/pixelfed.de\/storage\/avatars\/007\/957\/419\/970\/173\/747\/2\/KEg4YgCgsmzdgyVztszz_avatar.jpeg?v=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35","header":"","header_static":"","emojis":[],"moved":null,"fields":null,"bot":false,"software":"pixelfed","is_admin":false},"media_attachments":[{"id":"17965","type":"image","url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/PgvSJ25k9SS6dhFh5l3v0rgQ5r7SY5JbepkrDkPP.jpeg","remote_url":null,"preview_url":"https:\/\/pixelfed.de\/storage\/m\/d0931bf747b992a1c83e055753526516f2706111\/d75e944e8cc85b953d37d1a9d615f44d6e0cca22\/PgvSJ25k9SS6dhFh5l3v0rgQ5r7SY5JbepkrDkPP_thumb.jpeg","text_url":null,"meta":null,"description":null}]}]"""
@get:Rule
var globalTimeout: Timeout = Timeout.seconds(100)
@get:Rule
var activityRule: ActivityScenarioRule
= ActivityScenarioRule(MainActivity::class.java)
+
private val dispatcher: Dispatcher = object : Dispatcher() {
@Throws(InterruptedException::class)
override fun dispatch(request: RecordedRequest): MockResponse {
@@ -71,6 +78,16 @@ class MockedServerTest {
return MockResponse()
.addHeader("Content-Type", "application/json; charset=utf-8")
.setResponseCode(200).setBody(notificationsJson)
+ } else if (request.path?.startsWith("/api/v1/timelines/home") == true) {
+ return MockResponse().addHeader(
+ "Content-Type",
+ "application/json; charset=utf-8"
+ ).setResponseCode(200).setBody(feedJson)
+ } else if (request.path?.matches("/api/v1/accounts/[0-9]*/statuses".toRegex()) == true) {
+ return MockResponse().addHeader(
+ "Content-Type",
+ "application/json; charset=utf-8"
+ ).setResponseCode(200).setBody(accountStatusesJson)
}
return MockResponse().setResponseCode(404)
}
@@ -126,6 +143,40 @@ class MockedServerTest {
Thread.sleep(1000)
onView(withText("6 Likes")).check(matches(withId(R.id.nlikes)))
}
+
+ @Test
+ fun clickNotificationUser() {
+ ActivityScenario.launch(MainActivity::class.java).onActivity{
+ a -> a.findViewById(R.id.tabs).getTabAt(3)?.select()
+ }
+ Thread.sleep(1000)
+
+ onView(withId(R.id.view_pager)).perform(ViewActions.swipeUp()).perform(ViewActions.swipeDown())
+ Thread.sleep(1000)
+
+ onView(withText("Dobios followed you")).perform(ViewActions.click())
+ Thread.sleep(1000)
+ onView(withText("Dobios")).check(matches(withId(R.id.accountNameTextView)))
+ }
+
+ @Test
+ fun clickNotificationPost() {
+ ActivityScenario.launch(MainActivity::class.java).onActivity{
+ a -> a.findViewById(R.id.tabs).getTabAt(3)?.select()
+ }
+ Thread.sleep(1000)
+
+ onView(withId(R.id.view_pager)).perform(ViewActions.swipeUp()).perform(ViewActions.swipeDown())
+ Thread.sleep(1000)
+
+ onView(withText("Dobios liked your post")).perform(ViewActions.click())
+ Thread.sleep(1000)
+
+ onView(withId(R.id.username)).perform(ViewActions.click())
+ Thread.sleep(10000)
+ onView(withText("Dante")).check(matches(withId(R.id.accountNameTextView)))
+ }
+
@Test
fun testDrawerSettingsButton() {
// Open Drawer to click on navigation.
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 3f184156..3fbe5fa9 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -13,7 +13,12 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
-
+
+
+
+
+
+
diff --git a/app/src/main/java/com/h/pixeldroid/PostActivity.kt b/app/src/main/java/com/h/pixeldroid/PostActivity.kt
index 74ab8a16..bcbcaffd 100644
--- a/app/src/main/java/com/h/pixeldroid/PostActivity.kt
+++ b/app/src/main/java/com/h/pixeldroid/PostActivity.kt
@@ -6,7 +6,6 @@ import com.h.pixeldroid.fragments.PostFragment
import com.h.pixeldroid.objects.Status.Companion.POST_TAG
import com.h.pixeldroid.objects.Status
-
class PostActivity : AppCompatActivity() {
lateinit var postFragment : PostFragment
diff --git a/app/src/main/java/com/h/pixeldroid/ProfileActivity.kt b/app/src/main/java/com/h/pixeldroid/ProfileActivity.kt
new file mode 100644
index 00000000..90e13b22
--- /dev/null
+++ b/app/src/main/java/com/h/pixeldroid/ProfileActivity.kt
@@ -0,0 +1,104 @@
+package com.h.pixeldroid
+
+import android.content.Context
+import android.content.SharedPreferences
+import android.graphics.Typeface
+import android.os.Bundle
+import android.util.Log
+import android.view.View
+import android.widget.ImageView
+import android.widget.TextView
+import androidx.appcompat.app.AppCompatActivity
+import androidx.recyclerview.widget.GridLayoutManager
+import androidx.recyclerview.widget.RecyclerView
+import com.h.pixeldroid.api.PixelfedAPI
+import com.h.pixeldroid.fragments.ProfilePostsRecyclerViewAdapter
+import com.h.pixeldroid.objects.Account
+import com.h.pixeldroid.objects.Account.Companion.ACCOUNT_TAG
+import com.h.pixeldroid.objects.Status
+import com.h.pixeldroid.utils.ImageConverter.Companion.setRoundImageFromURL
+import retrofit2.Call
+import retrofit2.Callback
+import retrofit2.Response
+
+class ProfileActivity : AppCompatActivity() {
+
+ private lateinit var adapter : ProfilePostsRecyclerViewAdapter
+ private lateinit var recycler : RecyclerView
+ private lateinit var preferences: SharedPreferences
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setContentView(R.layout.activity_profile)
+
+ // Set RecyclerView as a grid with 3 columns
+ recycler = findViewById(R.id.profilePostsRecyclerView)
+ recycler.layoutManager = GridLayoutManager(this, 3)
+ adapter = ProfilePostsRecyclerViewAdapter(this)
+ recycler.adapter = adapter
+
+ preferences = getSharedPreferences(
+ "${BuildConfig.APPLICATION_ID}.pref", Context.MODE_PRIVATE
+ )
+
+ // Set profile according to given account
+ val account = intent.getSerializableExtra(ACCOUNT_TAG) as Account
+
+ setContent(account)
+ // Set profile picture
+ val profilePicture = findViewById(R.id.profilePictureImageView)
+ setRoundImageFromURL(View(this), account.avatar, profilePicture)
+
+ setPosts(account)
+ }
+
+ private fun setContent(account: Account) {
+ val profilePicture = findViewById(R.id.profilePictureImageView)
+ setRoundImageFromURL(View(this), account.avatar, profilePicture)
+
+ val description = findViewById(R.id.descriptionTextView)
+ description.text = account.note
+
+ val accountName = findViewById(R.id.accountNameTextView)
+ accountName.text = account.username
+
+ val nbPosts = findViewById(R.id.nbPostsTextView)
+ nbPosts.text = "${account.statuses_count}\nPosts"
+ nbPosts.setTypeface(null, Typeface.BOLD)
+
+ val nbFollowers = findViewById(R.id.nbFollowersTextView)
+ nbFollowers.text = "${account.followers_count}\nFollowers"
+ nbFollowers.setTypeface(null, Typeface.BOLD)
+
+ val nbFollowing = findViewById(R.id.nbFollowingTextView)
+ nbFollowing.text = "${account.following_count}\nFollowing"
+ nbFollowing.setTypeface(null, Typeface.BOLD)
+ }
+
+ // Populate profile page with user's posts
+ private fun setPosts(account: Account) {
+ val pixelfedAPI = PixelfedAPI.create("${preferences.getString("domain", "")}")
+ val accessToken = preferences.getString("accessToken", "")
+
+ pixelfedAPI.accountPosts("Bearer $accessToken", account_id = account.id).enqueue(object :
+ Callback> {
+ override fun onFailure(call: Call>, t: Throwable) {
+ Log.e("ProfileFragment.Posts:", t.toString())
+ }
+
+ override fun onResponse(
+ call: Call>,
+ response: Response>
+ ) {
+ if(response.code() == 200) {
+ val posts = ArrayList()
+ val statuses = response.body()!!
+ for(status in statuses) {
+ posts.add(status)
+ }
+ adapter.addPosts(posts)
+ }
+ }
+ })
+ }
+}
diff --git a/app/src/main/java/com/h/pixeldroid/api/PixelfedAPI.kt b/app/src/main/java/com/h/pixeldroid/api/PixelfedAPI.kt
index dd06e333..b78394aa 100644
--- a/app/src/main/java/com/h/pixeldroid/api/PixelfedAPI.kt
+++ b/app/src/main/java/com/h/pixeldroid/api/PixelfedAPI.kt
@@ -38,6 +38,52 @@ interface PixelfedAPI {
@Field("grant_type") grant_type: String? = null
): Call
+ @POST("api/v1/statuses/{id}/favourite")
+ fun likePost(
+ //The authorization header needs to be of the form "Bearer "
+ @Header("Authorization") authorization: String,
+ @Path("id") statusId: String
+ ) : Call
+
+ @POST("/api/v1/statuses/{id}/unfavourite")
+ fun unlikePost(
+ //The authorization header needs to be of the form "Bearer "
+ @Header("Authorization") authorization: String,
+ @Path("id") statusId: String
+ ) : Call
+
+ @POST("/api/v1/statuses/{id}/favourited_by")
+ fun postLikedBy(
+ @Path("id") statusId: String
+ ) : Call>
+
+ //Used in our case to post a comment
+ @FormUrlEncoded
+ @POST("/api/v1/statuses")
+ fun commentStatus(
+ //The authorization header needs to be of the form "Bearer "
+ @Header("Authorization") authorization: String,
+ @Field("status") statusText : String,
+ @Field("in_reply_to_id") in_reply_to_id : String,
+ @Field("media_ids[]") media_ids : List = emptyList(),
+ @Field("poll[options][]") poll_options : List? = null,
+ @Field("poll[expires_in]") poll_expires : List? = null,
+ @Field("poll[multiple]") poll_multiple : List? = null,
+ @Field("poll[hide_totals]") poll_hideTotals : List? = null,
+ @Field("sensitive") sensitive : Boolean? = null,
+ @Field("spoiler_text") spoiler_text : String? = null,
+ @Field("visibility") visibility : String = "public",
+ @Field("scheduled_at") scheduled_at : String? = null,
+ @Field("language") language : String? = null
+ ) : Call
+
+ //Used in our case to retrieve comments for a given status
+ @GET("/api/v1/statuses/{id}/context")
+ fun statusComments(
+ @Path("id") statusId: String,
+ @Header("Authorization") authorization: String? = null
+ ) : Call
+
@GET("/api/v1/timelines/public")
fun timelinePublic(
@Query("local") local: Boolean? = null,
@@ -47,7 +93,6 @@ interface PixelfedAPI {
@Query("limit") limit: String? = null
): Call>
-
@GET("/api/v1/timelines/home")
fun timelineHome(
//The authorization header needs to be of the form "Bearer "
@@ -82,6 +127,12 @@ interface PixelfedAPI {
@Header("Authorization") authorization: String
): Call
+ @GET("/api/v1/accounts/{id}/statuses")
+ fun accountPosts(
+ @Header("Authorization") authorization: String,
+ @Path("id") account_id: String? = null
+ ): Call>
+
companion object {
fun create(baseUrl: String): PixelfedAPI {
return Retrofit.Builder()
diff --git a/app/src/main/java/com/h/pixeldroid/fragments/MyProfileFragment.kt b/app/src/main/java/com/h/pixeldroid/fragments/MyProfileFragment.kt
index 904676b1..7ffc8dcd 100644
--- a/app/src/main/java/com/h/pixeldroid/fragments/MyProfileFragment.kt
+++ b/app/src/main/java/com/h/pixeldroid/fragments/MyProfileFragment.kt
@@ -14,18 +14,22 @@ import android.view.ViewGroup
import android.widget.Button
import android.widget.ImageView
import android.widget.TextView
-import com.bumptech.glide.Glide
+import androidx.recyclerview.widget.GridLayoutManager
+import androidx.recyclerview.widget.RecyclerView
import com.h.pixeldroid.BuildConfig
import com.h.pixeldroid.R
import com.h.pixeldroid.api.PixelfedAPI
import com.h.pixeldroid.objects.Account
+import com.h.pixeldroid.objects.Status
+import com.h.pixeldroid.utils.ImageConverter.Companion.setRoundImageFromURL
import retrofit2.Call
import retrofit2.Callback
import retrofit2.Response
-
class MyProfileFragment : Fragment() {
private lateinit var preferences: SharedPreferences
+ private lateinit var adapter : ProfilePostsRecyclerViewAdapter
+ private lateinit var recycler : RecyclerView
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
@@ -36,9 +40,16 @@ class MyProfileFragment : Fragment() {
)
val view = inflater.inflate(R.layout.fragment_my_profile, container, false)
+ // Edit button redirects to pixelfed's "edit account" page
val editButton: Button = view.findViewById(R.id.editButton)
editButton.setOnClickListener((View.OnClickListener { onClickEditButton() }))
+ // Set RecyclerView as a grid with 3 columns
+ recycler = view.findViewById(R.id.myProfilePostsRecyclerView)
+ recycler.layoutManager = GridLayoutManager(context, 3)
+ adapter = ProfilePostsRecyclerViewAdapter(context!!)
+ recycler.adapter = adapter
+
return view
}
@@ -55,6 +66,27 @@ class MyProfileFragment : Fragment() {
val account = response.body()!!
setContent(view, account)
+
+ // Populate profile page with user's posts
+ pixelfedAPI.accountPosts("Bearer $accessToken", account_id = account.id).enqueue(object : Callback> {
+ override fun onFailure(call: Call>, t: Throwable) {
+ Log.e("ProfileFragment.Posts:", t.toString())
+ }
+
+ override fun onResponse(
+ call: Call>,
+ response: Response>
+ ) {
+ if(response.code() == 200) {
+ val posts = ArrayList()
+ val statuses = response.body()!!
+ for (status in statuses) {
+ posts.add(status)
+ }
+ adapter.addPosts(posts)
+ }
+ }
+ })
}
}
@@ -64,32 +96,28 @@ class MyProfileFragment : Fragment() {
})
}
+ // Populate myProfile page with user's data
private fun setContent(view: View, account: Account) {
- // ImageView : profile picture
val profilePicture = view.findViewById(R.id.profilePictureImageView)
- Glide.with(view.context).load(account.avatar).into(profilePicture)
+ setRoundImageFromURL(view, account.avatar, profilePicture)
- // TextView : description / bio
val description = view.findViewById(R.id.descriptionTextView)
description.text = account.note
- // TextView : account name
val accountName = view.findViewById(R.id.accountNameTextView)
accountName.text = account.username
+ accountName.setTypeface(null, Typeface.BOLD)
- // TextView : number of posts
val nbPosts = view.findViewById(R.id.nbPostsTextView)
- nbPosts.text = account.statuses_count.toString() + "\nPosts"
+ nbPosts.text = "${account.statuses_count}\nPosts"
nbPosts.setTypeface(null, Typeface.BOLD)
- // TextView : number of followers
val nbFollowers = view.findViewById(R.id.nbFollowersTextView)
- nbFollowers.text = account.followers_count.toString() + "\nFollowers"
+ nbFollowers.text = "${account.followers_count}\nFollowers"
nbFollowers.setTypeface(null, Typeface.BOLD)
- // TextView : number of following
val nbFollowing = view.findViewById(R.id.nbFollowingTextView)
- nbFollowing.text = account.following_count.toString() + "\nFollowing"
+ nbFollowing.text = "${account.following_count}\nFollowing"
nbFollowing.setTypeface(null, Typeface.BOLD)
}
diff --git a/app/src/main/java/com/h/pixeldroid/fragments/PostFragment.kt b/app/src/main/java/com/h/pixeldroid/fragments/PostFragment.kt
index c9bc5ced..020e0d31 100644
--- a/app/src/main/java/com/h/pixeldroid/fragments/PostFragment.kt
+++ b/app/src/main/java/com/h/pixeldroid/fragments/PostFragment.kt
@@ -1,10 +1,13 @@
package com.h.pixeldroid.fragments
+import android.graphics.Color
+import android.graphics.drawable.ColorDrawable
import android.os.Bundle
-import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
+import androidx.fragment.app.Fragment
+import com.bumptech.glide.Glide
import com.h.pixeldroid.R
import com.h.pixeldroid.objects.Status.Companion.POST_TAG
import com.h.pixeldroid.objects.Status
@@ -20,19 +23,11 @@ class PostFragment : Fragment() {
): View? {
val status = arguments?.getSerializable(POST_TAG) as Status?
val root = inflater.inflate(R.layout.post_fragment, container, false)
- status?.setupPost(root)
- //Setup post and profile images
- ImageConverter.setImageViewFromURL(
- this,
- status?.getPostUrl(),
- root.postPicture
- )
- ImageConverter.setImageViewFromURL(
- this,
- status?.getProfilePicUrl(),
- root.profilePic
- )
+ val picRequest = Glide.with(this)
+ .asDrawable().fitCenter()
+ .placeholder(ColorDrawable(Color.GRAY))
+
+ status?.setupPost(root, picRequest, root.postPicture, root.profilePic)
return root
}
-
}
diff --git a/app/src/main/java/com/h/pixeldroid/fragments/ProfilePostsFragment.kt b/app/src/main/java/com/h/pixeldroid/fragments/ProfilePostsFragment.kt
new file mode 100644
index 00000000..6fac84e1
--- /dev/null
+++ b/app/src/main/java/com/h/pixeldroid/fragments/ProfilePostsFragment.kt
@@ -0,0 +1,57 @@
+package com.h.pixeldroid.fragments
+
+import android.content.Context
+import android.content.SharedPreferences
+import android.os.Bundle
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import androidx.fragment.app.Fragment
+import androidx.recyclerview.widget.GridLayoutManager
+import androidx.recyclerview.widget.LinearLayoutManager
+import androidx.recyclerview.widget.RecyclerView
+import com.h.pixeldroid.BuildConfig
+import com.h.pixeldroid.R
+import com.h.pixeldroid.api.PixelfedAPI
+
+/**
+ * A fragment representing a list of Items.
+ * Activities containing this fragment MUST implement the
+ * [ProfilePostsFragment.OnListFragmentInteractionListener] interface.
+ */
+class ProfilePostsFragment : Fragment() {
+ private lateinit var preferences: SharedPreferences
+ private lateinit var pixelfedAPI: PixelfedAPI
+ private var accessToken: String? = null
+
+ private var columnCount = 3
+
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ }
+
+ override fun onCreateView(
+ inflater: LayoutInflater, container: ViewGroup?,
+ savedInstanceState: Bundle?
+ ): View? {
+ val view = inflater.inflate(R.layout.fragment_profile_posts_list, container, false)
+ preferences = activity!!.getSharedPreferences(
+ "${BuildConfig.APPLICATION_ID}.pref", Context.MODE_PRIVATE
+ )
+ pixelfedAPI = PixelfedAPI.create("${preferences.getString("domain", "")}")
+ accessToken = preferences.getString("accessToken", "")
+
+ // Set the adapter
+ if (view is RecyclerView) {
+ with(view) {
+ layoutManager = when {
+ columnCount <= 1 -> LinearLayoutManager(context)
+ else -> GridLayoutManager(context, columnCount)
+ }
+ adapter = ProfilePostsRecyclerViewAdapter(context!!)
+ }
+ }
+ return view
+ }
+}
diff --git a/app/src/main/java/com/h/pixeldroid/fragments/ProfilePostsRecyclerViewAdapter.kt b/app/src/main/java/com/h/pixeldroid/fragments/ProfilePostsRecyclerViewAdapter.kt
new file mode 100644
index 00000000..d591386b
--- /dev/null
+++ b/app/src/main/java/com/h/pixeldroid/fragments/ProfilePostsRecyclerViewAdapter.kt
@@ -0,0 +1,51 @@
+package com.h.pixeldroid.fragments
+
+import android.content.Context
+import android.content.Intent
+import androidx.recyclerview.widget.RecyclerView
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import android.widget.ImageView
+import com.h.pixeldroid.PostActivity
+import com.h.pixeldroid.R
+import com.h.pixeldroid.objects.Status
+import com.h.pixeldroid.utils.ImageConverter.Companion.setSquareImageFromURL
+
+/**
+ * [RecyclerView.Adapter] that can display a list of [PostMiniature]s and makes a call to the
+ * specified [OnListFragmentInteractionListener].
+ */
+class ProfilePostsRecyclerViewAdapter(
+ private val context: Context
+) : RecyclerView.Adapter() {
+ private val posts: ArrayList = ArrayList()
+
+ fun addPosts(newPosts : List) {
+ val size = posts.size
+ posts.addAll(newPosts)
+ notifyItemRangeInserted(size, newPosts.size)
+ }
+
+ override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
+ val view = LayoutInflater.from(parent.context)
+ .inflate(R.layout.fragment_profile_posts, parent, false)
+ return ViewHolder(view)
+ }
+
+ override fun onBindViewHolder(holder: ViewHolder, position: Int) {
+ val post = posts[position]
+ setSquareImageFromURL(holder.postView, post.getPostPreviewURL(), holder.postPreview)
+ holder.postPreview.setOnClickListener {
+ val intent = Intent(context, PostActivity::class.java)
+ intent.putExtra(Status.POST_TAG, post)
+ context.startActivity(intent)
+ }
+ }
+
+ override fun getItemCount(): Int = posts.size
+
+ inner class ViewHolder(val postView: View) : RecyclerView.ViewHolder(postView) {
+ val postPreview: ImageView = postView.findViewById(R.id.postPreview)
+ }
+}
diff --git a/app/src/main/java/com/h/pixeldroid/fragments/feeds/FeedFragment.kt b/app/src/main/java/com/h/pixeldroid/fragments/feeds/FeedFragment.kt
index b8872f86..8f96f0ce 100644
--- a/app/src/main/java/com/h/pixeldroid/fragments/feeds/FeedFragment.kt
+++ b/app/src/main/java/com/h/pixeldroid/fragments/feeds/FeedFragment.kt
@@ -7,6 +7,7 @@ import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
+import android.widget.ProgressBar
import android.widget.Toast
import androidx.fragment.app.Fragment
import androidx.lifecycle.LiveData
@@ -42,6 +43,7 @@ open class FeedFragment: Fragment(
protected lateinit var list : RecyclerView
protected lateinit var adapter : FeedsRecyclerViewAdapter
private lateinit var swipeRefreshLayout: SwipeRefreshLayout
+ private lateinit var loadingIndicator: ProgressBar
override fun onCreateView(
inflater: LayoutInflater,
@@ -51,6 +53,7 @@ open class FeedFragment: Fragment(
val view = inflater.inflate(R.layout.fragment_feed, container, false)
swipeRefreshLayout = view.findViewById(R.id.swipeRefreshLayout)
+ loadingIndicator = view.findViewById(R.id.progressBar)
list = swipeRefreshLayout.list
// Set the adapter
list.layoutManager = LinearLayoutManager(context)
@@ -111,7 +114,7 @@ open class FeedFragment: Fragment(
Toast.makeText(context,"Something went wrong while loading", Toast.LENGTH_SHORT).show()
}
swipeRefreshLayout.isRefreshing = false
- progressBar.visibility = View.GONE
+ loadingIndicator.visibility = View.GONE
}
override fun onFailure(call: Call>, t: Throwable) {
diff --git a/app/src/main/java/com/h/pixeldroid/fragments/feeds/HomeFragment.kt b/app/src/main/java/com/h/pixeldroid/fragments/feeds/HomeFragment.kt
index 08503e3e..7c55fe25 100644
--- a/app/src/main/java/com/h/pixeldroid/fragments/feeds/HomeFragment.kt
+++ b/app/src/main/java/com/h/pixeldroid/fragments/feeds/HomeFragment.kt
@@ -97,32 +97,23 @@ class HomeFragment : FeedFragment metrics.heightPixels) {
ImageConverter.setDefaultImage(holder.postView, holder.postPic)
}
-
- //Set the the text views
- post.setupPost(holder.postView)
}
/**
* Represents the posts that will be contained within the feed
*/
inner class ViewHolder(val postView: View) : RecyclerView.ViewHolder(postView) {
- val profilePic : ImageView? = postView.findViewById(R.id.profilePic)
+ val profilePic : ImageView = postView.findViewById(R.id.profilePic)
val postPic : ImageView = postView.findViewById(R.id.postPicture)
val username : TextView = postView.findViewById(R.id.username)
val usernameDesc: TextView = postView.findViewById(R.id.usernameDesc)
diff --git a/app/src/main/java/com/h/pixeldroid/fragments/feeds/NotificationsFragment.kt b/app/src/main/java/com/h/pixeldroid/fragments/feeds/NotificationsFragment.kt
index b912ec99..a5323e9e 100644
--- a/app/src/main/java/com/h/pixeldroid/fragments/feeds/NotificationsFragment.kt
+++ b/app/src/main/java/com/h/pixeldroid/fragments/feeds/NotificationsFragment.kt
@@ -23,7 +23,9 @@ import com.bumptech.glide.integration.recyclerview.RecyclerViewPreloader
import com.bumptech.glide.request.RequestOptions
import com.bumptech.glide.util.ViewPreloadSizeProvider
import com.h.pixeldroid.PostActivity
+import com.h.pixeldroid.ProfileActivity
import com.h.pixeldroid.R
+import com.h.pixeldroid.objects.Account
import com.h.pixeldroid.objects.Notification
import com.h.pixeldroid.objects.Status
import kotlinx.android.synthetic.main.fragment_feed.*
@@ -113,8 +115,8 @@ class NotificationsFragment : FeedFragment {
- val url = notification.status?.url ?: notification.account.url
- intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
+ intent = Intent(context, ProfileActivity::class.java)
+ intent.putExtra(Account.ACCOUNT_TAG, notification.account)
}
}
context.startActivity(intent)
diff --git a/app/src/main/java/com/h/pixeldroid/objects/Account.kt b/app/src/main/java/com/h/pixeldroid/objects/Account.kt
index e042d84b..e681ab07 100644
--- a/app/src/main/java/com/h/pixeldroid/objects/Account.kt
+++ b/app/src/main/java/com/h/pixeldroid/objects/Account.kt
@@ -1,5 +1,9 @@
package com.h.pixeldroid.objects
+import android.content.Context
+import android.content.Intent
+import androidx.core.content.ContextCompat.startActivity
+import com.h.pixeldroid.ProfileActivity
import java.io.Serializable
/*
@@ -33,5 +37,16 @@ data class Account(
val fields: List? = emptyList(),
val bot: Boolean = false,
val source: Source? = null
-) : Serializable
+) : Serializable {
+ companion object {
+ const val ACCOUNT_TAG = "AccountTag"
+ }
+
+ // Open profile activity with given account
+ fun openProfile(context: Context) {
+ val intent = Intent(context, ProfileActivity::class.java)
+ intent.putExtra(Account.ACCOUNT_TAG, this)
+ startActivity(context, intent, null)
+ }
+}
diff --git a/app/src/main/java/com/h/pixeldroid/objects/Context.kt b/app/src/main/java/com/h/pixeldroid/objects/Context.kt
new file mode 100644
index 00000000..f64b78af
--- /dev/null
+++ b/app/src/main/java/com/h/pixeldroid/objects/Context.kt
@@ -0,0 +1,8 @@
+package com.h.pixeldroid.objects
+
+import java.io.Serializable
+
+data class Context(
+ val ancestors : List,
+ val descendants : List
+) : Serializable
\ No newline at end of file
diff --git a/app/src/main/java/com/h/pixeldroid/objects/Status.kt b/app/src/main/java/com/h/pixeldroid/objects/Status.kt
index 76e1b017..f8a1550f 100644
--- a/app/src/main/java/com/h/pixeldroid/objects/Status.kt
+++ b/app/src/main/java/com/h/pixeldroid/objects/Status.kt
@@ -1,10 +1,10 @@
package com.h.pixeldroid.objects
import android.graphics.Typeface
+import android.graphics.drawable.Drawable
import android.view.View
-import android.widget.TextView
-import androidx.fragment.app.Fragment
-import com.h.pixeldroid.R
+import android.widget.ImageView
+import com.bumptech.glide.RequestBuilder
import com.h.pixeldroid.utils.ImageConverter
import kotlinx.android.synthetic.main.post_fragment.view.*
import java.io.Serializable
@@ -56,8 +56,9 @@ data class Status(
const val POST_FRAG_TAG = "postFragTag"
}
- fun getPostUrl() : String? = media_attachments?.getOrNull(0)?.url
- fun getProfilePicUrl() : String? = account?.avatar
+ fun getPostUrl() : String? = media_attachments.getOrNull(0)?.url
+ fun getProfilePicUrl() : String? = account.avatar
+ fun getPostPreviewURL() : String? = media_attachments.getOrNull(0)?.preview_url
fun getDescription() : CharSequence {
val description = content as CharSequence
@@ -85,10 +86,16 @@ data class Status(
return "$nShares Shares"
}
- fun setupPost(rootView : View) {
+ fun setupPost(
+ rootView: View,
+ request: RequestBuilder,
+ postPic: ImageView,
+ profilePic: ImageView
+ ) {
//Setup username as a button that opens the profile
rootView.username.text = this.getUsername()
rootView.username.setTypeface(null, Typeface.BOLD)
+ rootView.username.setOnClickListener { account.openProfile(rootView.context) }
rootView.usernameDesc.text = this.getUsername()
rootView.usernameDesc.setTypeface(null, Typeface.BOLD)
@@ -101,7 +108,15 @@ data class Status(
rootView.nshares.text = this.getNShares()
rootView.nshares.setTypeface(null, Typeface.BOLD)
+ request.load(this.getPostUrl()).into(postPic)
+ ImageConverter.setRoundImageFromURL(
+ rootView,
+ this.getProfilePicUrl(),
+ profilePic
+ )
+ profilePic.setOnClickListener { account.openProfile(rootView.context) }
}
+
enum class Visibility : Serializable {
public, unlisted, private, direct
}
diff --git a/app/src/main/java/com/h/pixeldroid/utils/ImageConverter.kt b/app/src/main/java/com/h/pixeldroid/utils/ImageConverter.kt
index bd821389..324c2bd9 100644
--- a/app/src/main/java/com/h/pixeldroid/utils/ImageConverter.kt
+++ b/app/src/main/java/com/h/pixeldroid/utils/ImageConverter.kt
@@ -62,6 +62,16 @@ class ImageConverter {
.placeholder(R.drawable.ic_default_user).into(image)
}
+ /**
+ * @brief Loads a given image (via url) as a square image into a given image view
+ * @param view, the view in which this is happening
+ * @param url, the url of the image that will be loaded
+ * @param image, the imageView into which we will load the image
+ */
+ fun setSquareImageFromURL(view : View, url : String?, image : ImageView) {
+ Glide.with(view).load(url).apply(RequestOptions().centerCrop()).into(image)
+ }
+
/**
* @brief Loads a default image into a given image view
* @param view, the view in which this is happening
diff --git a/app/src/main/res/layout/activity_profile.xml b/app/src/main/res/layout/activity_profile.xml
new file mode 100644
index 00000000..a87faa23
--- /dev/null
+++ b/app/src/main/res/layout/activity_profile.xml
@@ -0,0 +1,161 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_home.xml b/app/src/main/res/layout/fragment_home.xml
index e4dc7cde..78ac319a 100644
--- a/app/src/main/res/layout/fragment_home.xml
+++ b/app/src/main/res/layout/fragment_home.xml
@@ -16,8 +16,6 @@
android:name="com.h.pixeldroid.FeedFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_marginLeft="16dp"
- android:layout_marginRight="16dp"
app:layoutManager="LinearLayoutManager"
tools:listitem="@layout/post_fragment" />
diff --git a/app/src/main/res/layout/fragment_my_profile.xml b/app/src/main/res/layout/fragment_my_profile.xml
index df1e0387..a111db2a 100644
--- a/app/src/main/res/layout/fragment_my_profile.xml
+++ b/app/src/main/res/layout/fragment_my_profile.xml
@@ -10,114 +10,164 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
-
-
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+ android:id="@+id/myProfilePostsRecyclerView"
+ android:layout_marginLeft="16dp"
+ android:layout_marginRight="16dp"
+ android:layout_marginTop="16dp"
+ app:layoutManager="LinearLayoutManager"
+ tools:context=".fragments.MyProfileFragment"
+ tools:listitem="@layout/fragment_profile_posts"/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_profile_posts.xml b/app/src/main/res/layout/fragment_profile_posts.xml
new file mode 100644
index 00000000..4b270951
--- /dev/null
+++ b/app/src/main/res/layout/fragment_profile_posts.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/fragment_profile_posts_list.xml b/app/src/main/res/layout/fragment_profile_posts_list.xml
new file mode 100644
index 00000000..273eaaca
--- /dev/null
+++ b/app/src/main/res/layout/fragment_profile_posts_list.xml
@@ -0,0 +1,13 @@
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/post_fragment.xml b/app/src/main/res/layout/post_fragment.xml
index 9e5d817a..971dd3fc 100644
--- a/app/src/main/res/layout/post_fragment.xml
+++ b/app/src/main/res/layout/post_fragment.xml
@@ -1,10 +1,10 @@
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ tools:context=".fragments.PostFragment">