android/source/src/java/org/libreoffice/LOKitTileProvider.java |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 5453f75a1e682992f3a725781bb563b8cc76cf1b
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Tue Apr 26 16:43:15 2022 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Wed Apr 27 05:51:32 2022 +0200

    android: Slightly clean up style of LOKitTileProvider#resetParts
    
    * Reduce scope of the `parts` variable to the if block
    * add an emptly line before the next method
    
    Change-Id: I22389cb4c9307f6888c4ed836056caf23ce84da6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133450
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/android/source/src/java/org/libreoffice/LOKitTileProvider.java 
b/android/source/src/java/org/libreoffice/LOKitTileProvider.java
index fa22bc803c9a..0c7931763571 100644
--- a/android/source/src/java/org/libreoffice/LOKitTileProvider.java
+++ b/android/source/src/java/org/libreoffice/LOKitTileProvider.java
@@ -176,9 +176,9 @@ class LOKitTileProvider implements TileProvider {
     }
 
     public void resetParts(){
-        int parts = mDocument.getParts();
         mContext.getDocumentPartView().clear();
         if (mDocument.getDocumentType() != Document.DOCTYPE_TEXT) {
+            int parts = mDocument.getParts();
             for (int i = 0; i < parts; i++) {
                 String partName = mDocument.getPartName(i);
 
@@ -192,7 +192,9 @@ class LOKitTileProvider implements TileProvider {
                 mContext.getDocumentPartView().add(partView);
             }
         }
-    } public void renamePart(String partName) {
+    }
+
+    public void renamePart(String partName) {
         try{
             for(int i=0; i<mDocument.getParts(); i++){
                 
if(mContext.getDocumentPartView().get(i).partName.equals(partName)){

Reply via email to