Search in sources :

Example 1 with GitPreferencesFromRepoPrefs

use of com.orgzly.android.git.GitPreferencesFromRepoPrefs in project orgzly-android by orgzly.

the class GitRepo method getInstance.

public static GitRepo getInstance(RepoWithProps props, Context context) throws IOException {
    // TODO: This doesn't seem to be implemented in the same way as WebdavRepo.kt, do
    // we want to store configuration data the same way they do?
    Repo repo = props.getRepo();
    Uri repoUri = Uri.parse(repo.getUrl());
    RepoPreferences repoPreferences = new RepoPreferences(context, repo.getId(), repoUri);
    GitPreferencesFromRepoPrefs prefs = new GitPreferencesFromRepoPrefs(repoPreferences);
    return build(props.getRepo().getId(), prefs, false);
}
Also used : RepoPreferences(com.orgzly.android.prefs.RepoPreferences) Repo(com.orgzly.android.db.entity.Repo) GitPreferencesFromRepoPrefs(com.orgzly.android.git.GitPreferencesFromRepoPrefs) Uri(android.net.Uri)

Aggregations

Uri (android.net.Uri)1 Repo (com.orgzly.android.db.entity.Repo)1 GitPreferencesFromRepoPrefs (com.orgzly.android.git.GitPreferencesFromRepoPrefs)1 RepoPreferences (com.orgzly.android.prefs.RepoPreferences)1