HomeView
struct HomeView : View
The HomeView
where users are presented with the different conversations that they are in.
It is also here that we redirect them to other pages, let it be the ChatView
or the SettingsView
.
-
Context of the
CoreData
for persistent storage.Declaration
Swift
@Environment var context: NSManagedObjectContext { get }
-
Initialize the ChatBrain which handles logic of Bluetooth and sending / receiving messages.
Declaration
Swift
@StateObject var chatBrain: ChatHandler { get }
-
Get conversations saved to Core Data and sort them by date last updated.
Declaration
Swift
@FetchRequest var conversations: FetchedResults<ConversationEntity> { get }
-
Body and content of the HomeView.
Declaration
Swift
var body: some View { get }