package app.furmeet.events.brasilfurfest.notification

import android.os.Bundle
import androidx.recyclerview.widget.LinearLayoutManager
import com.adlerosn.brasilfurfest.R
import app.furmeet.events.brasilfurfest.TranslatableAppCompatActivity
import app.furmeet.events.brasilfurfest.schedule.managers.ScheduleManagerGetter
import kotlinx.android.synthetic.main.activity_past_notifications.*

class PastNotificationsActivity : TranslatableAppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_past_notifications)
        setSupportActionBar(toolbar)

        val scheduleManager = ScheduleManagerGetter[this]
        val announcements = scheduleManager.conventionSeries.announcements.sortedBy { -it.created.timeInMillis }

        past_notifications_rv.adapter = PastNotificationsAdapter(announcements)
        past_notifications_rv.layoutManager = LinearLayoutManager(this)
    }
}
