Skip to content

Commit

Permalink
Fix duplicate entries
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Mar 16, 2023
1 parent 19ce90b commit 51cf584
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
7 changes: 4 additions & 3 deletions app/src/main/java/com/nltechno/dolidroidpro/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public void onStart() {
int count = 0;
boolean entryfound = false;
while (count < this.listOfRootUrl.size()) {
if (this.listOfRootUrl.get(count).url == strLine) {
if (strLine.equals(this.listOfRootUrl.get(count).url)) {
entryfound = true;
break;
}
Expand Down Expand Up @@ -250,7 +250,7 @@ public void onStart() {
tmps += " ("+this.listOfRootUrl.get(i).getScheme();
if (! "".equals(this.listOfRootUrl.get(i).getBasicAuthLogin())) {
tmps += " - "+this.listOfRootUrl.get(i).getBasicAuthLogin();
//tmps += ":"+this.listOfRootUrl.get(i).getBasicAuthPass();
tmps += ":"+this.listOfRootUrl.get(i).getBasicAuthPass();
}
tmps += ")";
adapter.add(tmps);
Expand Down Expand Up @@ -628,7 +628,7 @@ public void openDolUrl(View button) throws IOException
int count = 0;
boolean entryfound = false;
while (count < this.listOfRootUrl.size()) {
if (this.listOfRootUrl.get(count).url == dolRootUrl) {
if (dolRootUrl.equals(this.listOfRootUrl.get(count).url)) {
entryfound = true;
break;
}
Expand All @@ -644,6 +644,7 @@ public void openDolUrl(View button) throws IOException
// Add new entry into the array this.listOfRootUrl
PredefinedUrl tmppredefinedurl = new PredefinedUrl();
tmppredefinedurl.url = dolRootUrl;
tmppredefinedurl.position = 100;
this.listOfRootUrl.add(tmppredefinedurl);
}
fos.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void onCreate(Bundle savedInstanceState) {
tmps += " ("+MainActivity.listOfRootUrl.get(count).getScheme();
if (! "".equals(MainActivity.listOfRootUrl.get(count).getBasicAuthLogin())) {
tmps += " - "+MainActivity.listOfRootUrl.get(count).getBasicAuthLogin();
//tmps += ":"+this.listOfRootUrl.get(i).getBasicAuthPass();
tmps += ":"+MainActivity.listOfRootUrl.get(count).getBasicAuthPass();
}
tmps += ")";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public ManageUrlAdapter(Context context, String[] values) {
public View getView(int position, View convertView, ViewGroup parent) {
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View rowView = inflater.inflate(R.layout.manage_url_item, parent, false);
View activityview = inflater.inflate(R.layout.activity_manageurl, parent, false);

TextView textView = (TextView) rowView.findViewById(R.id.text_view);
ImageView imageView = (ImageView) rowView.findViewById(R.id.image_view);
Expand Down Expand Up @@ -101,7 +100,7 @@ public void onClick(View v) {
tmps += " ("+MainActivity.listOfRootUrl.get(count).getScheme();
if (! "".equals(MainActivity.listOfRootUrl.get(count).getBasicAuthLogin())) {
tmps += " - "+MainActivity.listOfRootUrl.get(count).getBasicAuthLogin();
//tmps += ":"+this.listOfRootUrl.get(i).getBasicAuthPass();
tmps += ":"+MainActivity.listOfRootUrl.get(count).getBasicAuthPass();
}
tmps += ")";

Expand Down

0 comments on commit 51cf584

Please sign in to comment.