package Ġcom . may ur dh aka . android apps . android times Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . webkit . WebView Ċ import Ġandroid . webkit . WebView Client Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroidx . compose . Composable Ċ import Ġandroidx . compose . Model Ċ import Ġandroidx . ui . core . Alignment Ċ import Ġandroidx . ui . core . Context Ambient Ċ import Ġandroidx . ui . core . Modifier Ċ import Ġandroidx . ui . core . setContent Ċ import Ġandroidx . ui . foundation . Box Ċ import Ġandroidx . ui . foundation . Text Ċ import Ġandroidx . ui . layout .* Ċ import Ġandroidx . ui . material . Circular Progress Indicator Ċ import Ġandroidx . ui . material . Material Theme Ċ import Ġandroidx . ui . tool ing . preview . Preview Ċ import Ġandroidx . ui . unit . dp Ċ import Ġandroidx . ui . view interop . Android View Ċ import Ġcom . may ur dh aka . android apps . android times . views . Entry View Ċ import Ġcom . may ur dh aka . android apps . android times . views . Feed View Ċ import Ġcom . may ur dh aka . android apps . android times . views . Home View Ċ import Ġcom . may ur dh aka . android apps . android times . views . sample Post Ċ import Ġcom . may ur dh aka . android apps . net . Entry Ċ import Ġcom . may ur dh aka . android apps . net . Feed Fetcher Ċ import Ġkotlinx . coroutines . Dispatch ers Ċ import Ġkotlinx . coroutines . Global Scope Ċ import Ġkotlinx . coroutines . launch Ċ import Ġkotlinx . coroutines . with Context Ċ import Ġkotlin . coroutines . Coroutine Context Ċ Ċ class ĠMainActivity Ġ: ĠAppCompatActivity () Ġ{ Ċ ĉ private Ġval Ġfeed Fetcher Ġ= ĠFeed Fetcher () ĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĊĉ ĉ setContent Ġ{ Ċĉĉ ĉ Material Theme Ġ{ Ċĉĉĉ ĉ Home View ( current Home State Ġ= ĠCurrent Home State ) Ċĉĉ ĉ } Ċĉ ĉ } ĊĊĉ ĉ Global Scope . launch Ġ{ Ċĉĉ ĉ val Ġdf Feed Ġ= Ġfeed Fetcher . get Feed At URL (" https :// d aring fire ball . net / feeds / main ") Ċĉĉ ĉ with Context ( Dispatch ers . Main ) Ġ{ Ċĉĉĉ ĉ Current Home State . state Ġ= ĠHome State . Display Entries ( df Feed ) Ċĉĉ ĉ } Ċĉ ĉ } ĊĠĠĠ Ġ} Ċ } Ċ Ċ sealed Ġclass ĠHome State Ġ{ Ċ ĉ object ĠLoading Ġ: ĠHome State () Ċ ĉ data Ġclass ĠDisplay Entries ( val Ġentries : ĠList < Entry >): ĠHome State () Ċ } Ċ Ċ @ Model Ċ object ĠCurrent Home State Ġ{ Ċ ĉ var Ġstate : ĠHome State Ġ= ĠHome State . Loading Ċ } ĊĊĊ