Skip to content

Commit e588d0a

Browse files
committed
Code revert as will be handled in theming and localization cluster.
1 parent a080e66 commit e588d0a

6 files changed

Lines changed: 3 additions & 41 deletions

File tree

app/src/main/java/com/owncloud/android/ui/activity/FolderPickerActivity.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,9 +348,7 @@ open class FolderPickerActivity :
348348
}
349349

350350
private fun toggleChooseEnabled() {
351-
val isFolderSelectable = checkFolderSelectable()
352-
mChooseBtn?.isEnabled = isFolderSelectable
353-
mChooseBtn?.alpha = if (isFolderSelectable) 1f else 0.5f
351+
mChooseBtn?.isEnabled = checkFolderSelectable()
354352
}
355353

356354
// for copy and move, disable selecting parent folder of target files

app/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
import android.view.MenuItem;
4141
import android.view.View;
4242
import android.view.ViewGroup;
43-
import android.view.ViewTreeObserver;
4443
import android.widget.AbsListView;
4544
import android.widget.Toast;
4645

@@ -225,11 +224,6 @@ public class OCFileListFragment extends ExtendedListFragment implements
225224

226225
@Inject DeviceInfo deviceInfo;
227226

228-
//this variable will help us to provide number of span count for grid view
229-
//the width for single item is approx to 360
230-
private static final int GRID_ITEM_DEFAULT_WIDTH = 360;
231-
private static final int DEFAULT_FALLBACK_SPAN_COUNT = 1;
232-
233227
protected enum MenuItemAddRemove {
234228
DO_NOTHING,
235229
REMOVE_SORT,
@@ -1472,40 +1466,12 @@ public int getSpanSize(int position) {
14721466
}
14731467

14741468
getRecyclerView().setLayoutManager(layoutManager);
1475-
calculateAndUpdateSpanCount(grid);
14761469
getRecyclerView().scrollToPosition(position);
14771470
getAdapter().setGridView(grid);
14781471
getRecyclerView().setAdapter(getAdapter());
14791472
getAdapter().notifyDataSetChanged();
14801473
}
14811474

1482-
/**
1483-
* method will calculate the number of spans required for grid item and will update the span accordingly
1484-
*
1485-
* @param isGrid
1486-
*/
1487-
private void calculateAndUpdateSpanCount(boolean isGrid) {
1488-
getRecyclerView().getViewTreeObserver().addOnGlobalLayoutListener(
1489-
new ViewTreeObserver.OnGlobalLayoutListener() {
1490-
@Override
1491-
public void onGlobalLayout() {
1492-
getRecyclerView().getViewTreeObserver().removeOnGlobalLayoutListener(this);
1493-
if (isGrid) {
1494-
int viewWidth = getRecyclerView().getMeasuredWidth();
1495-
int newSpanCount = viewWidth / GRID_ITEM_DEFAULT_WIDTH;
1496-
RecyclerView.LayoutManager layoutManager = getRecyclerView().getLayoutManager();
1497-
if (layoutManager instanceof GridLayoutManager) {
1498-
if (newSpanCount < 1) {
1499-
newSpanCount = DEFAULT_FALLBACK_SPAN_COUNT;
1500-
}
1501-
((GridLayoutManager) layoutManager).setSpanCount(newSpanCount);
1502-
layoutManager.requestLayout();
1503-
}
1504-
}
1505-
}
1506-
});
1507-
}
1508-
15091475
public CommonOCFileListAdapterInterface getCommonAdapter() {
15101476
return mAdapter;
15111477
}

app/src/main/java/com/owncloud/android/ui/fragment/UnifiedSearchFragment.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ import com.nextcloud.client.account.CurrentAccountProvider
3838
import com.nextcloud.client.core.AsyncRunner
3939
import com.nextcloud.client.di.Injectable
4040
import com.nextcloud.client.di.ViewModelFactory
41-
import com.nextcloud.client.network.ClientFactory
4241
import com.nmc.android.utils.KeyboardUtils
42+
import com.nextcloud.client.network.ClientFactory
4343
import com.owncloud.android.R
4444
import com.owncloud.android.databinding.ListFragmentBinding
4545
import com.owncloud.android.datamodel.FileDataStorageManager

app/src/main/res/menu/partial_drawer_entries.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
android:icon="@drawable/nav_recently"
5959
android:orderInCategory="0"
6060
android:title="@string/drawer_item_recently_modified"
61-
android:visible="false"/>
61+
android:visible="true"/>
6262
<item
6363
android:orderInCategory="0"
6464
android:id="@+id/nav_notifications"

app/src/main/res/values-de/strings.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -977,5 +977,4 @@
977977
<item quantity="one">%d ausgewählt</item>
978978
<item quantity="other">%d ausgewählt</item>
979979
</plurals>
980-
<string name="camera_permission_rationale">Bitte geben Sie unter Apps &amp; Benachrichtigungen in den Einstellungen manuell die Erlaubnis.</string>
981980
</resources>

app/src/main/res/values/strings.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1077,5 +1077,4 @@
10771077
<string name="document_scan_export_dialog_images">Multiple images</string>
10781078
<string name="download_cannot_create_file">Cannot create local file</string>
10791079
<string name="download_download_invalid_local_file_name">Invalid filename for local file</string>
1080-
<string name="camera_permission_rationale">Please navigate to App info in settings and give permission manually.</string>
10811080
</resources>

0 commit comments

Comments
 (0)