32 lines
1.1 KiB
Kotlin
32 lines
1.1 KiB
Kotlin
package pl.edu.amu.wmi.socialaggregator.activity
|
|
|
|
import android.os.Bundle
|
|
import androidx.appcompat.app.AppCompatActivity
|
|
import androidx.recyclerview.widget.LinearLayoutManager
|
|
import pl.edu.amu.wmi.socialaggregator.R
|
|
|
|
import kotlinx.android.synthetic.main.activity_post_history.*
|
|
import kotlinx.android.synthetic.main.content_post_history.*
|
|
import pl.edu.amu.wmi.socialaggregator.utils.SocialPlatformsManager
|
|
import pl.edu.amu.wmi.socialaggregator.viewholders.PostDetailsRecycler
|
|
|
|
class PostHistoryActivity : AppCompatActivity() {
|
|
|
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
super.onCreate(savedInstanceState)
|
|
setContentView(R.layout.activity_post_history)
|
|
setSupportActionBar(toolbar)
|
|
|
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
|
|
|
postHistoryRecycler.apply {
|
|
layoutManager = LinearLayoutManager(this@PostHistoryActivity)
|
|
adapter = PostDetailsRecycler(
|
|
SocialPlatformsManager.getLoggedIn(this@PostHistoryActivity)
|
|
.flatMap { it.getPosts(this@PostHistoryActivity) }
|
|
)
|
|
}
|
|
}
|
|
|
|
}
|