@ -345,7 +345,8 @@ public final class MainHelper implements SwipeRefreshLayout.OnRefreshListener {
|
||||
ImageViewCompat.setImageTintList(iconFeed, colorStateList.withAlpha(otherIconAlpha));
|
||||
} else {
|
||||
// this changes toolbar title
|
||||
main.mainBinding.toolbar.toolbar.setTitle(slideOffset >= 0.466 ? titleDiscover : main.userQuery);
|
||||
main.mainBinding.toolbar.toolbar.setTitle(slideOffset >= 0.466 ? titleDiscover :
|
||||
(main.userQuery == null ? resources.getString(R.string.app_name) : main.userQuery));
|
||||
|
||||
imageTintList = ImageViewCompat.getImageTintList(iconFeed);
|
||||
alpha = imageTintList != null ? (imageTintList.getDefaultColor() & 0xFF_000000) >> 24 : 0;
|
||||
|
@ -15,7 +15,7 @@ public abstract class BaseLanguageActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable final Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
Utils.changeTheme(this);
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ public final class ProfileViewer extends BaseLanguageActivity implements SwipeRe
|
||||
private HashtagModel hashtagModel;
|
||||
private LocationModel locationModel;
|
||||
private StoryModel[] storyModels;
|
||||
private MenuItem downloadAction;
|
||||
private MenuItem downloadAction, favouriteAction;
|
||||
private final FetchListener<PostModel[]> postsFetchListener = new FetchListener<PostModel[]>() {
|
||||
@Override
|
||||
public void onResult(final PostModel[] result) {
|
||||
@ -755,12 +755,32 @@ public final class ProfileViewer extends BaseLanguageActivity implements SwipeRe
|
||||
downloadAction = menu.findItem(R.id.downloadAction);
|
||||
downloadAction.setVisible(false);
|
||||
|
||||
favouriteAction = menu.findItem(R.id.favouriteAction);
|
||||
favouriteAction.setVisible(!Utils.isEmpty(cookie));
|
||||
favouriteAction.setIcon(Utils.dataBox.getFavorite(userQuery) == null ? R.drawable.ic_not_liked : R.drawable.ic_like);
|
||||
|
||||
downloadAction.setOnMenuItemClickListener(item -> {
|
||||
if (selectedItems.size() > 0) {
|
||||
Utils.batchDownload(this, userQuery, DownloadMethod.DOWNLOAD_MAIN, selectedItems);
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
favouriteAction.setOnMenuItemClickListener(item -> {
|
||||
if (Utils.dataBox.getFavorite(userQuery) == null) {
|
||||
Utils.dataBox.addFavorite(new DataBox.FavoriteModel(userQuery, System.currentTimeMillis(),
|
||||
locationModel != null ? locationModel.getName() : userQuery.replaceAll("^@", "")));
|
||||
favouriteAction.setIcon(R.drawable.ic_like);
|
||||
}
|
||||
else {
|
||||
Utils.dataBox.delFavorite(new DataBox.FavoriteModel(userQuery,
|
||||
Long.parseLong(Utils.dataBox.getFavorite(userQuery).split("/")[1]),
|
||||
locationModel != null ? locationModel.getName() : userQuery.replaceAll("^@", "")));
|
||||
favouriteAction.setIcon(R.drawable.ic_not_liked);
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -172,6 +172,8 @@ public final class SavedViewer extends BaseLanguageActivity implements SwipeRefr
|
||||
downloadAction = menu.findItem(R.id.downloadAction);
|
||||
downloadAction.setVisible(false);
|
||||
|
||||
menu.findItem(R.id.favouriteAction).setVisible(false);
|
||||
|
||||
downloadAction.setOnMenuItemClickListener(item -> {
|
||||
if (selectedItems.size() > 0) {
|
||||
Utils.batchDownload(this, null, DownloadMethod.DOWNLOAD_SAVED, selectedItems);
|
||||
|
@ -38,11 +38,12 @@ public class DirectMessageStoryShareViewHolder extends DirectMessageItemViewHold
|
||||
binding.tvMessage.setText(text);
|
||||
binding.tvMessage.setVisibility(View.VISIBLE);
|
||||
}
|
||||
final DirectItemModel.DirectItemMediaModel reelShareMedia = reelShare.getMedia();
|
||||
final MediaItemType mediaType = reelShareMedia.getMediaType();
|
||||
binding.typeIcon.setVisibility(mediaType == MediaItemType.MEDIA_TYPE_VIDEO ||
|
||||
mediaType == MediaItemType.MEDIA_TYPE_SLIDER ? View.VISIBLE : View.GONE);
|
||||
getGlideRequestManager().load(reelShareMedia.getThumbUrl()).into(binding.ivMediaPreview);
|
||||
else {
|
||||
final DirectItemModel.DirectItemMediaModel reelShareMedia = reelShare.getMedia();
|
||||
final MediaItemType mediaType = reelShareMedia.getMediaType();
|
||||
binding.typeIcon.setVisibility(mediaType == MediaItemType.MEDIA_TYPE_VIDEO ? View.VISIBLE : View.GONE);
|
||||
getGlideRequestManager().load(reelShareMedia.getThumbUrl()).into(binding.ivMediaPreview);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -299,9 +299,7 @@ public class DirectMessageThreadFragment extends Fragment {
|
||||
dialogAdapter = new ArrayAdapter<>(requireContext(), android.R.layout.simple_list_item_1, dialogList);
|
||||
|
||||
new AlertDialog.Builder(requireContext())
|
||||
//.setTitle(title)
|
||||
.setAdapter(dialogAdapter, onDialogListener)
|
||||
// .setNeutralButton(R.string.cancel, null)
|
||||
.show();
|
||||
}
|
||||
};
|
||||
|
@ -690,7 +690,7 @@ public final class Utils {
|
||||
JSONObject boldItem = bold.getJSONObject(q);
|
||||
desc = desc.substring(0, boldItem.getInt("start") + q*7) + "<b>"
|
||||
+ desc.substring(boldItem.getInt("start") + q*7, boldItem.getInt("end") + q*7)
|
||||
+ "</b>" + desc.substring(boldItem.getInt("end") + q*7, desc.length());
|
||||
+ "</b>" + desc.substring(boldItem.getInt("end") + q*7);
|
||||
}
|
||||
actionLogModel = new DirectItemActionLogModel(desc);
|
||||
break;
|
||||
@ -810,6 +810,7 @@ public final class Utils {
|
||||
if (settingsHelper != null) {
|
||||
isAmoledEnabled = settingsHelper.getBoolean(Constants.AMOLED_THEME);
|
||||
}
|
||||
AppCompatDelegate.setDefaultNightMode(themeCode);
|
||||
// use amoled theme only if enabled in settings
|
||||
if (isAmoledEnabled) {
|
||||
// check if setting is set to 'Dark'
|
||||
@ -827,7 +828,6 @@ public final class Utils {
|
||||
return;
|
||||
}
|
||||
}
|
||||
AppCompatDelegate.setDefaultNightMode(themeCode);
|
||||
}
|
||||
|
||||
public static void setTooltipText(final View view, @StringRes final int tooltipTextRes) {
|
||||
|
@ -3,7 +3,7 @@
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="#333333">
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12,21.35l-1.45,-1.32C5.4,15.36 2,12.28 2,8.5 2,5.42 4.42,3 7.5,3c1.74,0 3.41,0.81 4.5,2.09C13.09,3.81 14.76,3 16.5,3 19.58,3 22,5.42 22,8.5c0,3.78 -3.4,6.86 -8.55,11.54L12,21.35z"/>
|
||||
|
10
app/src/main/res/drawable-anydpi/ic_not_liked.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M16.5,3c-1.74,0 -3.41,0.81 -4.5,2.09C10.91,3.81 9.24,3 7.5,3 4.42,3 2,5.42 2,8.5c0,3.78 3.4,6.86 8.55,11.54L12,21.35l1.45,-1.32C18.6,15.36 22,12.28 22,8.5 22,5.42 19.58,3 16.5,3zM12.1,18.55l-0.1,0.1 -0.1,-0.1C7.14,14.24 4,11.39 4,8.5 4,6.5 5.5,5 7.5,5c1.54,0 3.04,0.99 3.57,2.36h1.87C13.46,5.99 14.96,5 16.5,5c2,0 3.5,1.5 3.5,3.5 0,2.89 -3.14,5.74 -7.9,10.05z"/>
|
||||
</vector>
|
BIN
app/src/main/res/drawable-hdpi/ic_not_liked.png
Normal file
After Width: | Height: | Size: 435 B |
BIN
app/src/main/res/drawable-mdpi/ic_not_liked.png
Normal file
After Width: | Height: | Size: 311 B |
BIN
app/src/main/res/drawable-xhdpi/ic_not_liked.png
Normal file
After Width: | Height: | Size: 560 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_not_liked.png
Normal file
After Width: | Height: | Size: 815 B |
@ -22,6 +22,7 @@
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="end|top"
|
||||
android:layout_margin="8dp"
|
||||
android:visibility="gone"
|
||||
app:srcCompat="@drawable/video" />
|
||||
</FrameLayout>
|
||||
|
||||
|
@ -6,4 +6,9 @@
|
||||
android:id="@+id/downloadAction"
|
||||
android:icon="@drawable/ic_download"
|
||||
app:showAsAction="always|collapseActionView" />
|
||||
|
||||
<item
|
||||
android:id="@+id/favouriteAction"
|
||||
android:icon="@drawable/ic_not_liked"
|
||||
app:showAsAction="always|collapseActionView" />
|
||||
</menu>
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 122 KiB |
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 144 KiB |
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 152 KiB After Width: | Height: | Size: 152 KiB |
Before Width: | Height: | Size: 157 KiB After Width: | Height: | Size: 157 KiB |
@ -1 +0,0 @@
|
||||
InstaGrabber Revived
|