Reverted the text preview system to a single TextView
[pub/Android/ownCloud.git] / src / com / owncloud / android / ui / activity / FileDisplayActivity.java
index 63ca229..60636df 100644 (file)
@@ -1411,9 +1411,11 @@ public class FileDisplayActivity extends HookActivity implements
                 if (details instanceof PreviewMediaFragment) {
                     // Refresh  OCFile of the fragment
                     ((PreviewMediaFragment) details).updateFile(file);
-                } else {
+                } else if (details instanceof PreviewTextFragment) {
+                    // Refresh  OCFile of the fragment
+                    ((PreviewTextFragment) details).updateFile(file);
+                } else
                     showDetails(file);
-                }
             }
             invalidateOptionsMenu();
         }