u/Ron-Erez

Self Transfer

Hi everyone,

I’m flying to Helsinki on a Finnair itinerary (Vienna → Helsinki → Trondheim). The booking shows Helsinki as a layover before continuing to Trondheim, but I’m actually planning to end my trip in Helsinki.

I came across a suggestion from the booking site describing this as a “hidden city” situation and saying I could simply get off in Helsinki and skip the final leg to Norway. It also notes that airlines may not like this practice.

I understand I would need to travel without checked baggage if I were to do this.

I’m a bit unsure about this, and honestly I’m not comfortable with the idea—but I’m struggling to find reasonably priced direct options to Helsinki for my conference trip (originally starting from Tel Aviv, with this Vienna–Helsinki–Trondheim segment as part of the journey).

Is this something that’s actually okay to do in practice with Finnair, or could it cause issues (like cancellations, fees, or problems with the return ticket)?

Any advice or experiences would be appreciated.

reddit.com
u/Ron-Erez — 2 days ago

Activity ViewModel vs viewModel()

Hello Everyone,

I’m trying to better understand best practices around Activity-scoped vs composable-level ViewModels in Jetpack Compose.

Suppose I have a simple single-Activity Compose app.

Option 1 — Activity owns the ViewModel and passes it down:

class MainActivity : ComponentActivity() {

    private val vm: GameViewModel by viewModels()

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        setContent {
            GameScreen(vm)
        }
    }
}

Option 2 — retrieve the ViewModel inside the composable:

u/Composable
fun GameScreen(
    vm: GameViewModel = viewModel()
) {
}

My understanding is that in many simple single-Activity apps these may end up using the same ViewModel instance anyway.

So my questions are:

  1. In practice, when do you prefer explicit Activity-level ownership + dependency passing vs retrieving with viewModel() inside composables?
  2. Is the difference mainly architectural (explicit dependencies, testing, clarity), or are there important lifecycle/scoping implications I should think about?
  3. In modern Compose apps, what approach do experienced developers generally prefer?

I’m fairly new to Android dev with compose so I’d be happy to hear your thoughts. Perhaps activity level composables can completely be avoided or maybe there is a time and place for them.

EDIT: I just wanted to add that I really appreciate the responses and helpful comments. Thanks!

reddit.com
u/Ron-Erez — 13 days ago