bitfireAT / davx5-ose

DAVx⁵ is an open-source CalDAV/CardDAV suite and sync app for Android. You can also access your online files (WebDAV) with it.
https://www.davx5.com
GNU General Public License v3.0
1.25k stars 69 forks source link

Use hiltViewModel for creating ViewModels with parameters in new Screen architecture #776

Closed rfc2822 closed 2 weeks ago

rfc2822 commented 2 weeks ago

Purpose

Creation of ViewModels with parameters (@Assisted injection) is quite complicated now and involves code that can be dropped when using hiltViewModel().

Short description

This PR uses hiltViewModel() for creating such models for the screens that already have the new Screen/Model architecture and require parameters.

As soon as we switch to NavGraph, we'd have to use hiltViewModel() anyway.

Checklist