Search in sources :

Example 1 with KinoViewModel

use of de.tum.in.tumcampusapp.component.ui.news.KinoViewModel in project TumCampusApp by TCA-Team.

the class KinoActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    KinoLocalRepository.db = TcaDb.getInstance(this);
    kinoViewModel = new KinoViewModel(KinoLocalRepository.INSTANCE, KinoRemoteRepository.INSTANCE, disposable);
}
Also used : KinoViewModel(de.tum.in.tumcampusapp.component.ui.news.KinoViewModel)

Example 2 with KinoViewModel

use of de.tum.in.tumcampusapp.component.ui.news.KinoViewModel in project TumCampusApp by TCA-Team.

the class DownloadService method onCreate.

@Override
public void onCreate() {
    super.onCreate();
    Utils.log("DownloadService service has started");
    broadcastManager = LocalBroadcastManager.getInstance(this);
    new SyncManager(this);
    CafeteriaRemoteRepository remoteRepository = CafeteriaRemoteRepository.INSTANCE;
    remoteRepository.setTumCabeClient(TUMCabeClient.getInstance(this));
    CafeteriaLocalRepository localRepository = CafeteriaLocalRepository.INSTANCE;
    localRepository.setDb(TcaDb.getInstance(this));
    cafeteriaViewModel = new CafeteriaViewModel(localRepository, remoteRepository, mDisposable);
    // Init sync table
    KinoLocalRepository.INSTANCE.setDb(TcaDb.getInstance(this));
    KinoRemoteRepository.INSTANCE.setTumCabeClient(TUMCabeClient.getInstance(this));
    kinoViewModel = new KinoViewModel(KinoLocalRepository.INSTANCE, KinoRemoteRepository.INSTANCE, mDisposable);
}
Also used : CafeteriaViewModel(de.tum.in.tumcampusapp.component.ui.cafeteria.details.CafeteriaViewModel) SyncManager(de.tum.in.tumcampusapp.utils.sync.SyncManager) KinoViewModel(de.tum.in.tumcampusapp.component.ui.news.KinoViewModel) CafeteriaRemoteRepository(de.tum.in.tumcampusapp.component.ui.cafeteria.repository.CafeteriaRemoteRepository) CafeteriaLocalRepository(de.tum.in.tumcampusapp.component.ui.cafeteria.repository.CafeteriaLocalRepository)

Aggregations

KinoViewModel (de.tum.in.tumcampusapp.component.ui.news.KinoViewModel)2 CafeteriaViewModel (de.tum.in.tumcampusapp.component.ui.cafeteria.details.CafeteriaViewModel)1 CafeteriaLocalRepository (de.tum.in.tumcampusapp.component.ui.cafeteria.repository.CafeteriaLocalRepository)1 CafeteriaRemoteRepository (de.tum.in.tumcampusapp.component.ui.cafeteria.repository.CafeteriaRemoteRepository)1 SyncManager (de.tum.in.tumcampusapp.utils.sync.SyncManager)1