Browse Source

Fixed bug when long pressing bookmarks, removed unused strings

master
Anthony Restaino 9 years ago
parent
commit
399037d49b
  1. 12
      app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java
  2. 6
      app/src/main/res/values-fr/strings.xml

12
app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java

@ -2535,13 +2535,19 @@ public abstract class BrowserActivity extends ThemableActivity implements Browse @@ -2535,13 +2535,19 @@ public abstract class BrowserActivity extends ThemableActivity implements Browse
}
private void longPressFolder(String url) {
String title;
if (url.startsWith(Constants.FILE)) {
// We are getting the title from the url
// Strip '-bookmarks.html' from the end of the url
String title = url.substring(0, url.length() - BookmarkPage.FILENAME.length() - 1);
title = url.substring(0, url.length() - BookmarkPage.FILENAME.length() - 1);
// Strip the beginning of the url off and leave only the title
title = title.substring(Constants.FILE.length() + mActivity.getFilesDir().toString().length() + 1);
} else if (url.startsWith(Constants.FOLDER)) {
title = url.substring(Constants.FOLDER.length());
} else {
title = url;
}
final int position = BookmarkManager.getIndexOfBookmark(mBookmarkList, Constants.FOLDER + title);
if (position == -1) {
return;
@ -2581,7 +2587,7 @@ public abstract class BrowserActivity extends ThemableActivity implements Browse @@ -2581,7 +2587,7 @@ public abstract class BrowserActivity extends ThemableActivity implements Browse
}
private void longPressBookmarkLink(final String url) {
if (url.startsWith(Constants.FILE)) {
if (url.startsWith(Constants.FILE) || url.startsWith(Constants.FOLDER)) {
longPressFolder(url);
return;
}

6
app/src/main/res/values-fr/strings.xml

@ -1,22 +1,16 @@ @@ -1,22 +1,16 @@
<resources>
<string name="app_name">Lightning</string>
<string name="google">Google</string>
<string name="tabs">Onglets</string>
<string name="settings">Paramètres</string>
<string name="location">Accéder à ma position</string>
<string name="password">Enregistrer les mots de passe</string>
<string name="agent">User Agent</string>
<string name="history">Effacer l\'historique</string>
<string name="clear_cookies_exit">Effacer les cookies en quittant</string>
<string name="clear_history_exit">Effacer l\'historique en quittant</string>
<string name="email">Contactez moi</string>
<string name="flash">Activer Adobe Flash Player</string>
<string name="block_ads">Bloquer les publicités</string>
<string name="block">Bloquer les images</string>
<string name="third_party">Bloquer les cookies tiers</string>
<string name="mobile">Voir la version mobile</string>
<string name="desk">Voir la version ordinateur</string>
<string name="custom">Utiliser un User Agent personnalisé</string>
<string name="home">Au démarrage</string>
<string name="fullscreen">Activer le mode plein écran</string>
<string name="java">Activer JavaScript</string>

Loading…
Cancel
Save