Show archived repo message (#530)
Implement archived repo in all adapters Merge branch 'archive-repo2' into archive-repo Fix typos Fixing gravity. Restoring old names. Design changes. Adjusting sizing. Improving design of archived message. Show archived repo message and other fixes Co-authored-by: M M Arif <mmarif@swatian.com> Co-authored-by: opyale <opyale@noreply.gitea.io> Reviewed-by: opyale <opyale@noreply.codeberg.org>
This commit is contained in:
@@ -203,7 +203,7 @@ public class IssueActions {
|
||||
}
|
||||
else {
|
||||
|
||||
Toasty.info(ctx, ctx.getString(R.string.subscribtionError));
|
||||
Toasty.info(ctx, ctx.getString(R.string.subscriptionError));
|
||||
|
||||
}
|
||||
|
||||
@@ -263,7 +263,7 @@ public class IssueActions {
|
||||
}
|
||||
else {
|
||||
|
||||
Toasty.info(ctx, ctx.getString(R.string.unsubscribtionError));
|
||||
Toasty.info(ctx, ctx.getString(R.string.unsubscriptionError));
|
||||
|
||||
}
|
||||
|
||||
@@ -272,7 +272,7 @@ public class IssueActions {
|
||||
@Override
|
||||
public void onFailure(@NonNull Call<Void> call, @NonNull Throwable t) {
|
||||
|
||||
Toasty.info(ctx, ctx.getString(R.string.unsubscribtionError));
|
||||
Toasty.info(ctx, ctx.getString(R.string.unsubscriptionError));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -439,7 +439,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
||||
gitea_version = new Version(version.getVersion());
|
||||
}
|
||||
catch(Error e) {
|
||||
SnackBar.error(ctx, layoutView, getResources().getString(R.string.versionUnknow));
|
||||
SnackBar.error(ctx, layoutView, getResources().getString(R.string.versionUnknown));
|
||||
enableProcessButton();
|
||||
}
|
||||
//(getString(R.string.versionLow), getString(), version.getVersion());
|
||||
|
||||
@@ -201,7 +201,7 @@ public class SettingsAppearanceActivity extends BaseActivity {
|
||||
|
||||
AlertDialog.Builder hsBuilder = new AlertDialog.Builder(SettingsAppearanceActivity.this);
|
||||
|
||||
hsBuilder.setTitle(R.string.settingshomeScreenSelectorDialogTitle);
|
||||
hsBuilder.setTitle(R.string.settingsHomeScreenSelectorDialogTitle);
|
||||
if(homeScreenSelectedChoice != -1) {
|
||||
hsBuilder.setCancelable(true);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
@@ -58,6 +59,7 @@ public class ExploreRepositoriesAdapter extends RecyclerView.Adapter<ExploreRepo
|
||||
private TextView repoStars;
|
||||
private TextView repoForks;
|
||||
private TextView repoOpenIssuesCount;
|
||||
private LinearLayout archiveRepo;
|
||||
|
||||
private ReposSearchViewHolder(View itemView) {
|
||||
|
||||
@@ -73,6 +75,7 @@ public class ExploreRepositoriesAdapter extends RecyclerView.Adapter<ExploreRepo
|
||||
repoForks = itemView.findViewById(R.id.repoForks);
|
||||
repoOpenIssuesCount = itemView.findViewById(R.id.repoOpenIssuesCount);
|
||||
ImageView reposDropdownMenu = itemView.findViewById(R.id.reposDropdownMenu);
|
||||
archiveRepo = itemView.findViewById(R.id.archiveRepoFrame);
|
||||
|
||||
itemView.setOnClickListener(v -> {
|
||||
|
||||
@@ -242,6 +245,13 @@ public class ExploreRepositoriesAdapter extends RecyclerView.Adapter<ExploreRepo
|
||||
}
|
||||
holder.isRepoAdmin.setChecked(currentItem.getPermissions().isAdmin());
|
||||
|
||||
if(currentItem.isArchived()) {
|
||||
holder.archiveRepo.setVisibility(View.VISIBLE);
|
||||
}
|
||||
else {
|
||||
holder.archiveRepo.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -11,6 +11,7 @@ import android.widget.CheckBox;
|
||||
import android.widget.Filter;
|
||||
import android.widget.Filterable;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import com.amulyakhare.textdrawable.TextDrawable;
|
||||
import com.amulyakhare.textdrawable.util.ColorGenerator;
|
||||
@@ -56,6 +57,7 @@ public class MyReposListAdapter extends RecyclerView.Adapter<MyReposListAdapter.
|
||||
private TextView repoOpenIssuesCount;
|
||||
private TextView repoType;
|
||||
private CheckBox isRepoAdmin;
|
||||
private LinearLayout archiveRepo;
|
||||
|
||||
private MyReposViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
@@ -70,6 +72,7 @@ public class MyReposListAdapter extends RecyclerView.Adapter<MyReposListAdapter.
|
||||
ImageView reposDropdownMenu = itemView.findViewById(R.id.reposDropdownMenu);
|
||||
repoType = itemView.findViewById(R.id.repoType);
|
||||
isRepoAdmin = itemView.findViewById(R.id.repoIsAdmin);
|
||||
archiveRepo = itemView.findViewById(R.id.archiveRepoFrame);
|
||||
|
||||
itemView.setOnClickListener(v -> {
|
||||
|
||||
@@ -252,6 +255,13 @@ public class MyReposListAdapter extends RecyclerView.Adapter<MyReposListAdapter.
|
||||
}
|
||||
holder.isRepoAdmin.setChecked(currentItem.getPermissions().isAdmin());
|
||||
|
||||
if(currentItem.isArchived()) {
|
||||
holder.archiveRepo.setVisibility(View.VISIBLE);
|
||||
}
|
||||
else {
|
||||
holder.archiveRepo.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -11,6 +11,7 @@ import android.widget.CheckBox;
|
||||
import android.widget.Filter;
|
||||
import android.widget.Filterable;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
@@ -56,6 +57,7 @@ public class ReposListAdapter extends RecyclerView.Adapter<ReposListAdapter.Repo
|
||||
private TextView repoForks;
|
||||
private TextView repoOpenIssuesCount;
|
||||
private TextView repoType;
|
||||
private LinearLayout archiveRepo;
|
||||
|
||||
private ReposViewHolder(View itemView) {
|
||||
|
||||
@@ -71,6 +73,7 @@ public class ReposListAdapter extends RecyclerView.Adapter<ReposListAdapter.Repo
|
||||
repoOpenIssuesCount = itemView.findViewById(R.id.repoOpenIssuesCount);
|
||||
ImageView reposDropdownMenu = itemView.findViewById(R.id.reposDropdownMenu);
|
||||
repoType = itemView.findViewById(R.id.repoType);
|
||||
archiveRepo = itemView.findViewById(R.id.archiveRepoFrame);
|
||||
|
||||
itemView.setOnClickListener(v -> {
|
||||
|
||||
@@ -249,6 +252,13 @@ public class ReposListAdapter extends RecyclerView.Adapter<ReposListAdapter.Repo
|
||||
}
|
||||
holder.isRepoAdmin.setChecked(currentItem.getPermissions().isAdmin());
|
||||
|
||||
if(currentItem.isArchived()) {
|
||||
holder.archiveRepo.setVisibility(View.VISIBLE);
|
||||
}
|
||||
else {
|
||||
holder.archiveRepo.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -11,6 +11,7 @@ import android.widget.CheckBox;
|
||||
import android.widget.Filter;
|
||||
import android.widget.Filterable;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import com.amulyakhare.textdrawable.TextDrawable;
|
||||
import com.amulyakhare.textdrawable.util.ColorGenerator;
|
||||
@@ -56,6 +57,7 @@ public class RepositoriesByOrgAdapter extends RecyclerView.Adapter<RepositoriesB
|
||||
private TextView repoForks;
|
||||
private TextView repoOpenIssuesCount;
|
||||
private TextView repoType;
|
||||
private LinearLayout archiveRepo;
|
||||
|
||||
private OrgReposViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
@@ -70,6 +72,7 @@ public class RepositoriesByOrgAdapter extends RecyclerView.Adapter<RepositoriesB
|
||||
repoOpenIssuesCount = itemView.findViewById(R.id.repoOpenIssuesCount);
|
||||
ImageView reposDropdownMenu = itemView.findViewById(R.id.reposDropdownMenu);
|
||||
repoType = itemView.findViewById(R.id.repoType);
|
||||
archiveRepo = itemView.findViewById(R.id.archiveRepoFrame);
|
||||
|
||||
itemView.setOnClickListener(v -> {
|
||||
|
||||
@@ -252,6 +255,13 @@ public class RepositoriesByOrgAdapter extends RecyclerView.Adapter<RepositoriesB
|
||||
}
|
||||
holder.isRepoAdmin.setChecked(currentItem.getPermissions().isAdmin());
|
||||
|
||||
if(currentItem.isArchived()) {
|
||||
holder.archiveRepo.setVisibility(View.VISIBLE);
|
||||
}
|
||||
else {
|
||||
holder.archiveRepo.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -11,6 +11,7 @@ import android.widget.CheckBox;
|
||||
import android.widget.Filter;
|
||||
import android.widget.Filterable;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import com.amulyakhare.textdrawable.TextDrawable;
|
||||
import com.amulyakhare.textdrawable.util.ColorGenerator;
|
||||
@@ -56,6 +57,7 @@ public class StarredReposListAdapter extends RecyclerView.Adapter<StarredReposLi
|
||||
private TextView repoForks;
|
||||
private TextView repoOpenIssuesCount;
|
||||
private TextView repoType;
|
||||
private LinearLayout archiveRepo;
|
||||
|
||||
private StarredReposViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
@@ -70,6 +72,7 @@ public class StarredReposListAdapter extends RecyclerView.Adapter<StarredReposLi
|
||||
repoOpenIssuesCount = itemView.findViewById(R.id.repoOpenIssuesCount);
|
||||
ImageView reposDropdownMenu = itemView.findViewById(R.id.reposDropdownMenu);
|
||||
repoType = itemView.findViewById(R.id.repoType);
|
||||
archiveRepo = itemView.findViewById(R.id.archiveRepoFrame);
|
||||
|
||||
itemView.setOnClickListener(v -> {
|
||||
|
||||
@@ -252,6 +255,13 @@ public class StarredReposListAdapter extends RecyclerView.Adapter<StarredReposLi
|
||||
}
|
||||
holder.isRepoAdmin.setChecked(currentItem.getPermissions().isAdmin());
|
||||
|
||||
if(currentItem.isArchived()) {
|
||||
holder.archiveRepo.setVisibility(View.VISIBLE);
|
||||
}
|
||||
else {
|
||||
holder.archiveRepo.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -605,7 +605,7 @@ public class MemorizingTrustManager implements X509TrustManager {
|
||||
|
||||
private boolean interactHostname(X509Certificate cert, String hostname) {
|
||||
|
||||
if(interact(hostNameMessage(cert, hostname), R.string.mtm_accept_servername) == MTMDecision.DECISION_ALWAYS) {
|
||||
if(interact(hostNameMessage(cert, hostname), R.string.mtm_accept_server_name) == MTMDecision.DECISION_ALWAYS) {
|
||||
storeCert(hostname, cert);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ public class UserRepositories {
|
||||
private String forks_count;
|
||||
private Boolean has_issues;
|
||||
private String avatar_url;
|
||||
private boolean archived;
|
||||
|
||||
private permissionsObject permissions;
|
||||
|
||||
@@ -167,4 +168,24 @@ public class UserRepositories {
|
||||
return avatar_url;
|
||||
}
|
||||
|
||||
public boolean isPrivateFlag() {
|
||||
|
||||
return privateFlag;
|
||||
}
|
||||
|
||||
public String getOpen_pr_counter() {
|
||||
|
||||
return open_pr_counter;
|
||||
}
|
||||
|
||||
public String getRelease_counter() {
|
||||
|
||||
return release_counter;
|
||||
}
|
||||
|
||||
public boolean isArchived() {
|
||||
|
||||
return archived;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user