Skip to content
This repository has been archived by the owner on Oct 2, 2021. It is now read-only.

Commit

Permalink
Update Matched V 0.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
RooyeKhat committed Jan 7, 2018
1 parent 320f393 commit 5c87c3e
Show file tree
Hide file tree
Showing 52 changed files with 4,807 additions and 2,268 deletions.
7 changes: 4 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ android {
applicationId "net.iGap"
minSdkVersion 15
targetSdkVersion 25
versionCode 50
versionName "0.4.1"
versionCode 52
versionName "0.4.3"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true

Expand Down Expand Up @@ -116,7 +116,7 @@ dependencies {
compile 'me.zhanghai.android.customtabshelper:library:1.0.3'
compile 'com.readystatesoftware.systembartint:systembartint:1.0.4'
compile 'cat.ereza:customactivityoncrash:2.1.0'
compile 'com.github.Rooyekhat-Media.Emoji:emoji-one:0.5.1.Fix'
compile 'com.github.RooyeKhat-Media.Emoji:emoji-one:0.5.1.Fix2'
compile 'io.realm:android-adapters:2.1.1'
compile 'org.osmdroid:osmdroid-android:5.6.5'
compile 'io.fotoapparat.fotoapparat:library:1.3.0'
Expand All @@ -127,6 +127,7 @@ dependencies {
provided 'com.android.support:support-annotations:26.0.2'
compile group: 'com.github.msarhan', name: 'ummalqura-calendar', version: '1.1.7'
compile 'com.sothree.slidinguppanel:library:3.4.0'
compile "com.tapstream.sdk:tapstream-android:3.3.1"
}

configurations.all {
Expand Down
2 changes: 2 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
# public *;
#}

### TapStream
-keep class com.google.android.gms.ads.identifier.** { *; }

########## My Tricks
-keep class io.github.meness.**, io.meness.github.** , net.iGap.proto.** , com.neovisionaries.ws.client.** { *; }
Expand Down
13 changes: 7 additions & 6 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -211,17 +211,18 @@
</intent-filter>
</receiver>

<receiver
android:name="com.tapstream.sdk.ReferrerReceiver"
android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>

<service android:name=".helper.ServiceContact" />
<service android:name=".module.UploadService" />
<service android:name=".module.MusicPlayer" />

<service
android:name=".helper.MyService"
android:enabled="true"
android:exported="true" />

<service android:name=".helper.MyServiceTemporat" />

<service
android:name="net.iGap.module.AuthenticatorService"
Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/net/iGap/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ public class Config {
public static String default_headerTextColor = "#00B0BF";
public static String default_progressColor = "#00B0BF";

//public static final String URL_WEBSOCKET = "wss://core7.igap.net";
public static final String URL_WEBSOCKET = "wss://secure.igap.net/hybrid/";
public static final String URL_MAP = "https://c.tile.openstreetmap.org/";
public static final String IGAP_LINK_PREFIX = "https://iGap.net/";
Expand Down
9 changes: 9 additions & 0 deletions app/src/main/java/net/iGap/G.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
import com.google.android.gms.analytics.GoogleAnalytics;
import com.google.android.gms.analytics.Tracker;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.tapstream.sdk.Config;
import com.tapstream.sdk.Event;
import com.tapstream.sdk.Tapstream;

import net.iGap.activities.ActivityCustomError;
import net.iGap.activities.ActivityMain;
Expand Down Expand Up @@ -379,6 +382,12 @@ public void run() {
inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);

new StartupActions();

Config config = new Config("igap", "rL3flccmQb-9qzwVcpIRZw");
Tapstream.create(this, config);

Event event = new Event("Run iGap", false);
Tapstream.getInstance().fireEvent(event);
}

@Override
Expand Down
24 changes: 13 additions & 11 deletions app/src/main/java/net/iGap/adapter/items/chat/AbstractMessage.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.lalongooo.videocompressor.video.MediaController;
import com.mikepenz.fastadapter.items.AbstractItem;

import io.realm.Realm;
import java.util.List;
import net.iGap.G;
import net.iGap.R;
import net.iGap.fragments.FragmentChat;
Expand Down Expand Up @@ -73,10 +73,6 @@
import net.iGap.realm.RealmRoomMessageFields;
import net.iGap.request.RequestChannelAddMessageReaction;

import java.util.List;

import io.realm.Realm;

import static android.content.Context.MODE_PRIVATE;
import static net.iGap.fragments.FragmentChat.getRealmChat;
import static net.iGap.helper.HelperCalander.convertToUnicodeFarsiNumber;
Expand Down Expand Up @@ -522,13 +518,14 @@ protected void voteAction(VH holder, Realm realm) {

LinearLayout lytContainer = (LinearLayout) holder.itemView.findViewById(R.id.m_container);
lytContainer.setMinimumWidth((int) G.context.getResources().getDimension(R.dimen.dp160));
lytContainer.setMinimumHeight((int) G.context.getResources().getDimension(R.dimen.dp100));
lytContainer.setMinimumHeight((int) G.context.getResources().getDimension(R.dimen.dp130));

LinearLayout lytVote = (LinearLayout) holder.itemView.findViewById(R.id.lyt_vote);
if (lytVote != null) {

LinearLayout lytVoteUp = (LinearLayout) holder.itemView.findViewById(R.id.lyt_vote_up);
LinearLayout lytVoteDown = (LinearLayout) holder.itemView.findViewById(R.id.lyt_vote_down);
TextView txtVoteForward = (TextView) holder.itemView.findViewById(R.id.img_vote_forward);
TextView txtVoteUp = (TextView) holder.itemView.findViewById(R.id.txt_vote_up);
TextView txtVoteDown = (TextView) holder.itemView.findViewById(R.id.txt_vote_down);
TextView txtViewsLabel = (TextView) holder.itemView.findViewById(R.id.txt_views_label);
Expand Down Expand Up @@ -597,6 +594,13 @@ public void onClick(View view) {
voteSend(ProtoGlobal.RoomMessageReaction.THUMBS_DOWN);
}
});

txtVoteForward.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
messageClickListener.onForwardClick(mMessage);
}
});
}
}

Expand Down Expand Up @@ -736,6 +740,7 @@ protected void replyMessageIfNeeded(VH holder, Realm realm) {
}

mContainer.setMinimumWidth(0);
mContainer.setMinimumHeight(0);

/**
* set replay container visible if message was replayed, otherwise, gone it
Expand Down Expand Up @@ -1303,10 +1308,7 @@ private void forOnCLick(VH holder, RealmAttachment attachment) {
// }
//}


if (attachment.getSize() == 0) {
messageClickListener.onUploadOrCompressCancel(progress, mMessage, holder.getAdapterPosition(), SendingStep.CORRUPTED_FILE);
} else if (HelperUploadFile.isUploading(mMessage.messageID)) {
if (HelperUploadFile.isUploading(mMessage.messageID)) {

if (mMessage.status.equals(ProtoGlobal.RoomMessageStatus.FAILED.toString())) {
if (G.userLogin) {
Expand Down
25 changes: 21 additions & 4 deletions app/src/main/java/net/iGap/adapter/items/chat/ViewMaker.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
import android.widget.RelativeLayout;
import android.widget.SeekBar;
import android.widget.TextView;

import com.daimajia.swipe.SwipeLayout;

import net.iGap.G;
import net.iGap.R;
import net.iGap.helper.HelperCalander;
Expand All @@ -44,8 +42,8 @@
import static android.widget.LinearLayout.VERTICAL;
import static java.lang.Boolean.TRUE;
import static net.iGap.G.context;
import static net.iGap.R.dimen.dp16;
import static net.iGap.R.dimen.dp1_minus;
import static net.iGap.R.dimen.dp32;
import static net.iGap.R.dimen.dp4;
import static net.iGap.R.dimen.dp52;
import static net.iGap.R.dimen.dp8;
Expand Down Expand Up @@ -814,8 +812,27 @@ static View getViewVote() {
lyt_vote_down.addView(txt_vote_down);
lyt_vote.addView(lyt_vote_down);

LinearLayout lyt_vote_forward = new LinearLayout(context);
lyt_vote_forward.setGravity(CENTER);
lyt_vote_forward.setOrientation(VERTICAL);
LinearLayout.LayoutParams layout_799_f = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
layout_799_f.topMargin = i_Dp(R.dimen.dp10);
lyt_vote_forward.setLayoutParams(layout_799_f);

MaterialDesignTextView img_vote_forward = new MaterialDesignTextView(context);
img_vote_forward.setId(R.id.img_vote_forward);
img_vote_forward.setPadding(5, 5, 5, 5);
img_vote_forward.setGravity(CENTER);
LinearLayout.LayoutParams layout_216_f = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
img_vote_forward.setText(context.getResources().getString(R.string.md_forward));
img_vote_forward.setTextColor(context.getResources().getColor(R.color.gray_6c));
setTextSize(img_vote_forward, R.dimen.dp20);
img_vote_forward.setLayoutParams(layout_216_f);
lyt_vote_forward.addView(img_vote_forward);
lyt_vote.addView(lyt_vote_forward);

View textView_564 = new View(context);
LinearLayout.LayoutParams layout_437 = new LinearLayout.LayoutParams(i_Dp(R.dimen.dp40), i_Dp(dp32));
LinearLayout.LayoutParams layout_437 = new LinearLayout.LayoutParams(i_Dp(R.dimen.dp40), i_Dp(dp16));
textView_564.setLayoutParams(layout_437);
lyt_vote.addView(textView_564);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public class ContactGroupFragment extends BaseFragment implements OnContactsGetL

private long roomId;
private int countAddMemberResponse = 0;
private int countMember = 0;
private int countAddMemberRequest = 0;
private static ProtoGlobal.Room.Type type;
private String typeCreate;
Expand Down Expand Up @@ -135,6 +136,7 @@ public void onComplete(RippleView rippleView) {
@Override
public void onChannelAddMember(Long RoomId, Long UserId, ProtoGlobal.ChannelRoom.Role role) {
countAddMemberResponse++;
countMember++;
if (countAddMemberResponse == countAddMemberRequest) {
addMember(RoomId, ProtoGlobal.Room.Type.CHANNEL);
}
Expand Down Expand Up @@ -170,6 +172,7 @@ public void onTimeOut() {
@Override
public void onGroupAddMember(Long roomId, Long UserId) {
countAddMemberResponse++;
countMember++;
if (countAddMemberResponse == countAddMemberRequest) {
addMember(roomId, ProtoGlobal.Room.Type.GROUP);
}
Expand Down Expand Up @@ -333,7 +336,7 @@ private void addItems() {

private void addMember(long roomId, ProtoGlobal.Room.Type roomType) {
RealmRoom.addOwnerToDatabase(roomId);
RealmRoom.updateMemberCount(roomId, roomType, countAddMemberRequest + 1); // plus with 1 , for own account
RealmRoom.updateMemberCount(roomId, roomType, countMember + 1); // plus with 1 , for own account
if (isAdded()) {
removeFromBaseFragment(ContactGroupFragment.this);
new GoToChatActivity(roomId).startActivity();
Expand Down
Loading

0 comments on commit 5c87c3e

Please sign in to comment.