mirror of
https://github.com/KokaKiwi/BarInsta
synced 2025-12-12 06:56:31 +00:00
Format code
This commit is contained in:
parent
89139618a5
commit
c0cc45bcc3
1 changed files with 65 additions and 57 deletions
|
|
@ -41,7 +41,6 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
|||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||
|
||||
import com.google.android.material.appbar.AppBarLayout;
|
||||
import com.google.android.material.snackbar.BaseTransientBottomBar;
|
||||
import com.google.android.material.snackbar.Snackbar;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
|
@ -617,9 +616,12 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe
|
|||
Log.e(TAG, "Error fetching profile relationship", t);
|
||||
final Context context = getContext();
|
||||
try {
|
||||
if (t == null) Toast.makeText(context, R.string.error_loading_profile_loggedin, Toast.LENGTH_LONG).show();
|
||||
else Toast.makeText(context, t.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
} catch (final Throwable ignored) {}
|
||||
if (t == null)
|
||||
Toast.makeText(context, R.string.error_loading_profile_loggedin, Toast.LENGTH_LONG).show();
|
||||
else
|
||||
Toast.makeText(context, t.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
} catch (final Throwable ignored) {
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -629,9 +631,11 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe
|
|||
Log.e(TAG, "Error fetching profile", t);
|
||||
final Context context = getContext();
|
||||
try {
|
||||
if (t == null) Toast.makeText(context, R.string.error_loading_profile_loggedin, Toast.LENGTH_LONG).show();
|
||||
if (t == null)
|
||||
Toast.makeText(context, R.string.error_loading_profile_loggedin, Toast.LENGTH_LONG).show();
|
||||
else Toast.makeText(context, t.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
} catch (final Throwable ignored) {}
|
||||
} catch (final Throwable ignored) {
|
||||
}
|
||||
}
|
||||
});
|
||||
return;
|
||||
|
|
@ -648,9 +652,11 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe
|
|||
Log.e(TAG, "Error fetching profile", t);
|
||||
final Context context = getContext();
|
||||
try {
|
||||
if (t == null) Toast.makeText(context, R.string.error_loading_profile, Toast.LENGTH_LONG).show();
|
||||
if (t == null)
|
||||
Toast.makeText(context, R.string.error_loading_profile, Toast.LENGTH_LONG).show();
|
||||
else Toast.makeText(context, t.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
} catch (final Throwable ignored) {}
|
||||
} catch (final Throwable ignored) {
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -667,8 +673,7 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe
|
|||
if (!isReallyPrivate()) {
|
||||
if (!postsSetupDone) {
|
||||
setupPosts();
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
binding.postsRecyclerView.refresh();
|
||||
}
|
||||
if (isLoggedIn) {
|
||||
|
|
@ -695,10 +700,12 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe
|
|||
result.getDateAdded()
|
||||
), new RepositoryCallback<Void>() {
|
||||
@Override
|
||||
public void onSuccess(final Void result) {}
|
||||
public void onSuccess(final Void result) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataNotAvailable() {}
|
||||
public void onDataNotAvailable() {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -721,7 +728,8 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onDataNotAvailable() {}
|
||||
public void onDataNotAvailable() {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -743,7 +751,8 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onDataNotAvailable() {}
|
||||
public void onDataNotAvailable() {
|
||||
}
|
||||
});
|
||||
}
|
||||
}));
|
||||
|
|
@ -757,7 +766,6 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe
|
|||
|
||||
final String postCount = String.valueOf(profileModel.getMediaCount());
|
||||
|
||||
|
||||
SpannableStringBuilder span = new SpannableStringBuilder(getResources().getQuantityString(R.plurals.main_posts_count,
|
||||
profileModel.getMediaCount() > 2000000000L
|
||||
? 2000000000
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue