mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-23 07:27:22 +01:00
remove obsolete method
This commit is contained in:
parent
20766631d5
commit
a580335fea
2 changed files with 2 additions and 19 deletions
|
@ -315,7 +315,6 @@ public class GamesListDelegate extends ListDelegateBase
|
||||||
final Set<Long> dbGroups = DBUtils.getGroups( m_activity ).keySet();
|
final Set<Long> dbGroups = DBUtils.getGroups( m_activity ).keySet();
|
||||||
|
|
||||||
if ( null == m_groupPositions || m_groupPositions.length != dbGroups.size() ) {
|
if ( null == m_groupPositions || m_groupPositions.length != dbGroups.size() ) {
|
||||||
long[] groupPositions = loadGroupPositions();
|
|
||||||
|
|
||||||
// If the stored order is out-of-sync with the DB, e.g. if
|
// If the stored order is out-of-sync with the DB, e.g. if
|
||||||
// there have been additions or deletions, keep the ordering
|
// there have been additions or deletions, keep the ordering
|
||||||
|
@ -323,6 +322,7 @@ public class GamesListDelegate extends ListDelegateBase
|
||||||
m_groupPositions = new long[dbGroups.size()];
|
m_groupPositions = new long[dbGroups.size()];
|
||||||
Set<Long> added = new HashSet<>();
|
Set<Long> added = new HashSet<>();
|
||||||
|
|
||||||
|
long[] groupPositions = loadGroupPositions();
|
||||||
int nextIndx = 0;
|
int nextIndx = 0;
|
||||||
for ( long posn : groupPositions ) {
|
for ( long posn : groupPositions ) {
|
||||||
if ( dbGroups.contains(posn) ) {
|
if ( dbGroups.contains(posn) ) {
|
||||||
|
@ -1937,12 +1937,10 @@ public class GamesListDelegate extends ListDelegateBase
|
||||||
|
|
||||||
private long[] loadGroupPositions()
|
private long[] loadGroupPositions()
|
||||||
{
|
{
|
||||||
long[] result;
|
long[] result = {};
|
||||||
Serializable obj = DBUtils.getSerializableFor( m_activity, GROUP_POSNS_KEY );
|
Serializable obj = DBUtils.getSerializableFor( m_activity, GROUP_POSNS_KEY );
|
||||||
if ( null != obj && obj instanceof long[] ) {
|
if ( null != obj && obj instanceof long[] ) {
|
||||||
result = (long[])obj;
|
result = (long[])obj;
|
||||||
} else {
|
|
||||||
result = XWPrefs.getGroupPositions( m_activity );
|
|
||||||
}
|
}
|
||||||
// Log.d( TAG, "loadGroupPositions() => %s", DbgUtils.toString(result) );
|
// Log.d( TAG, "loadGroupPositions() => %s", DbgUtils.toString(result) );
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -392,21 +392,6 @@ public class XWPrefs {
|
||||||
setPrefsLong( context, R.string.key_default_group, val );
|
setPrefsLong( context, R.string.key_default_group, val );
|
||||||
}
|
}
|
||||||
|
|
||||||
// PENDING: remove this in a release or two.
|
|
||||||
public static long[] getGroupPositions( Context context )
|
|
||||||
{
|
|
||||||
long[] posns = null;
|
|
||||||
String[] longStrs = getPrefsStringArray( context,
|
|
||||||
R.string.key_group_posns );
|
|
||||||
if ( null != longStrs ) {
|
|
||||||
posns = new long[longStrs.length];
|
|
||||||
for ( int ii = 0; ii < longStrs.length; ++ii ) {
|
|
||||||
posns[ii] = Long.parseLong(longStrs[ii]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return posns;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean getThumbEnabled( Context context )
|
public static boolean getThumbEnabled( Context context )
|
||||||
{
|
{
|
||||||
return 0 < getThumbPct( context );
|
return 0 < getThumbPct( context );
|
||||||
|
|
Loading…
Add table
Reference in a new issue