fixed spelling thanks @betheg

This commit is contained in:
iNPUTmice 2014-08-28 11:01:24 +02:00
parent 12cbd07693
commit 85b31b8d8b
8 changed files with 63 additions and 67 deletions

View File

@ -3,10 +3,10 @@
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:paddingBottom="4dp"
android:paddingLeft="8dp" android:paddingLeft="8dp"
android:paddingRight="8dp" android:paddingRight="8dp"
android:paddingBottom="4dp" android:paddingTop="4dp" >
android:paddingTop="4dp">
<LinearLayout <LinearLayout
android:id="@+id/message_box" android:id="@+id/message_box"
@ -21,31 +21,30 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:background="@color/primarybackground" android:background="@color/primarybackground"
android:orientation="vertical"
android:gravity="center_vertical" android:gravity="center_vertical"
android:paddingTop="4dp" android:orientation="vertical"
android:paddingBottom="4dp" android:paddingBottom="4dp"
android:paddingLeft="5dp"
android:paddingRight="5dp" android:paddingRight="5dp"
android:paddingLeft="5dp"> android:paddingTop="4dp" >
<ImageView <ImageView
android:id="@+id/message_image" android:id="@+id/message_image"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:paddingBottom="2dp"
android:scaleType="centerCrop"
android:background="@color/primarytext" android:background="@color/primarytext"
/> android:paddingBottom="2dp"
android:scaleType="centerCrop" />
<TextView <TextView
android:id="@+id/message_body" android:id="@+id/message_body"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:autoLink="web" android:autoLink="web"
android:textColor="@color/primarytext"
android:textIsSelectable="true" android:textIsSelectable="true"
android:textSize="14sp" android:textSize="14sp" />
android:textColor="@color/primarytext"/>
<Button <Button
android:id="@+id/download_button" android:id="@+id/download_button"
@ -53,24 +52,23 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/download_image" android:text="@string/download_image"
android:visibility="gone"/> android:visibility="gone" />
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingTop="1dp"> android:paddingTop="1dp" >
<ImageView <ImageView
android:id="@+id/security_indicator" android:id="@+id/security_indicator"
android:layout_width="12sp" android:layout_width="12sp"
android:layout_height="12sp" android:layout_height="12sp"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:gravity="center_vertical" android:layout_marginRight="6sp"
android:layout_marginTop="2sp" android:layout_marginTop="2sp"
android:src="@drawable/ic_indicator" android:gravity="center_vertical"
android:layout_marginRight="6sp"/> android:src="@drawable/ic_indicator" />
<TextView <TextView
android:id="@+id/message_time" android:id="@+id/message_time"
@ -79,8 +77,8 @@
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:gravity="center_vertical" android:gravity="center_vertical"
android:text="@string/sending" android:text="@string/sending"
android:textSize="12sp" android:textColor="@color/secondarytext"
android:textColor="@color/secondarytext"/> android:textSize="12sp" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View File

@ -3,10 +3,10 @@
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:paddingBottom="4dp"
android:paddingLeft="8dp" android:paddingLeft="8dp"
android:paddingRight="8dp" android:paddingRight="8dp"
android:paddingBottom="4dp" android:paddingTop="4dp" >
android:paddingTop="4dp">
<LinearLayout <LinearLayout
android:id="@+id/message_box" android:id="@+id/message_box"
@ -21,38 +21,37 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:background="@color/primarybackground" android:background="@color/primarybackground"
android:orientation="vertical"
android:gravity="center_vertical" android:gravity="center_vertical"
android:paddingTop="4dp" android:orientation="vertical"
android:paddingBottom="4dp" android:paddingBottom="4dp"
android:paddingLeft="5dp"
android:paddingRight="5dp" android:paddingRight="5dp"
android:paddingLeft="5dp"> android:paddingTop="4dp" >
<ImageView <ImageView
android:id="@+id/message_image" android:id="@+id/message_image"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:paddingBottom="2dp"
android:scaleType="centerCrop"
android:background="@color/primarytext" android:background="@color/primarytext"
/> android:paddingBottom="2dp"
android:scaleType="centerCrop" />
<TextView <TextView
android:id="@+id/message_body" android:id="@+id/message_body"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:autoLink="web" android:autoLink="web"
android:textColor="@color/primarytext"
android:textIsSelectable="true" android:textIsSelectable="true"
android:textSize="14sp" android:textSize="14sp" />
android:textColor="@color/primarytext"/>
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_gravity="right" android:layout_gravity="right"
android:paddingTop="1dp"> android:orientation="horizontal"
android:paddingTop="1dp" >
<TextView <TextView
android:id="@+id/message_time" android:id="@+id/message_time"
@ -61,19 +60,18 @@
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:gravity="center_vertical" android:gravity="center_vertical"
android:text="@string/sending" android:text="@string/sending"
android:textSize="12sp" android:textColor="@color/secondarytext"
android:textColor="@color/secondarytext"/> android:textSize="12sp" />
<ImageView <ImageView
android:id="@+id/security_indicator" android:id="@+id/security_indicator"
android:layout_width="12sp" android:layout_width="12sp"
android:layout_height="12sp" android:layout_height="12sp"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:gravity="center_vertical" android:layout_marginLeft="6sp"
android:layout_marginTop="2sp" android:layout_marginTop="2sp"
android:src="@drawable/ic_indicator" android:gravity="center_vertical"
android:layout_marginLeft="6sp"/> android:src="@drawable/ic_indicator" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View File

@ -12,8 +12,8 @@ public class Message extends AbstractEntity {
public static final int STATUS_RECEPTION_FAILED = -3; public static final int STATUS_RECEPTION_FAILED = -3;
public static final int STATUS_RECEIVED_OFFER = -2; public static final int STATUS_RECEIVED_OFFER = -2;
public static final int STATUS_RECIEVING = -1; public static final int STATUS_RECEIVING = -1;
public static final int STATUS_RECIEVED = 0; public static final int STATUS_RECEIVED = 0;
public static final int STATUS_UNSEND = 1; public static final int STATUS_UNSEND = 1;
public static final int STATUS_SEND = 2; public static final int STATUS_SEND = 2;
public static final int STATUS_SEND_FAILED = 3; public static final int STATUS_SEND_FAILED = 3;

View File

@ -34,11 +34,11 @@ public class MessageParser extends AbstractParser implements
Message finishedMessage; Message finishedMessage;
if (pgpBody != null) { if (pgpBody != null) {
finishedMessage = new Message(conversation, packet.getFrom(), finishedMessage = new Message(conversation, packet.getFrom(),
pgpBody, Message.ENCRYPTION_PGP, Message.STATUS_RECIEVED); pgpBody, Message.ENCRYPTION_PGP, Message.STATUS_RECEIVED);
} else { } else {
finishedMessage = new Message(conversation, packet.getFrom(), finishedMessage = new Message(conversation, packet.getFrom(),
packet.getBody(), Message.ENCRYPTION_NONE, packet.getBody(), Message.ENCRYPTION_NONE,
Message.STATUS_RECIEVED); Message.STATUS_RECEIVED);
} }
finishedMessage.setRemoteMsgId(packet.getId()); finishedMessage.setRemoteMsgId(packet.getId());
if (conversation.getMode() == Conversation.MODE_MULTI if (conversation.getMode() == Conversation.MODE_MULTI
@ -115,7 +115,7 @@ public class MessageParser extends AbstractParser implements
.setLatestMarkableMessageId(getMarkableMessageId(packet)); .setLatestMarkableMessageId(getMarkableMessageId(packet));
Message finishedMessage = new Message(conversation, Message finishedMessage = new Message(conversation,
packet.getFrom(), body, Message.ENCRYPTION_OTR, packet.getFrom(), body, Message.ENCRYPTION_OTR,
Message.STATUS_RECIEVED); Message.STATUS_RECEIVED);
finishedMessage.setTime(getTimestamp(packet)); finishedMessage.setTime(getTimestamp(packet));
finishedMessage.setRemoteMsgId(packet.getId()); finishedMessage.setRemoteMsgId(packet.getId());
return finishedMessage; return finishedMessage;
@ -156,7 +156,7 @@ public class MessageParser extends AbstractParser implements
status = Message.STATUS_SEND; status = Message.STATUS_SEND;
} }
} else { } else {
status = Message.STATUS_RECIEVED; status = Message.STATUS_RECEIVED;
} }
String pgpBody = getPgpBody(packet); String pgpBody = getPgpBody(packet);
conversation.setLatestMarkableMessageId(getMarkableMessageId(packet)); conversation.setLatestMarkableMessageId(getMarkableMessageId(packet));
@ -169,7 +169,7 @@ public class MessageParser extends AbstractParser implements
Message.ENCRYPTION_PGP, status); Message.ENCRYPTION_PGP, status);
} }
finishedMessage.setRemoteMsgId(packet.getId()); finishedMessage.setRemoteMsgId(packet.getId());
if (status == Message.STATUS_RECIEVED) { if (status == Message.STATUS_RECEIVED) {
finishedMessage.setTrueCounterpart(conversation.getMucOptions() finishedMessage.setTrueCounterpart(conversation.getMucOptions()
.getTrueCounterpart(counterPart)); .getTrueCounterpart(counterPart));
} }
@ -186,7 +186,7 @@ public class MessageParser extends AbstractParser implements
Element forwarded; Element forwarded;
if (packet.hasChild("received")) { if (packet.hasChild("received")) {
forwarded = packet.findChild("received").findChild("forwarded"); forwarded = packet.findChild("received").findChild("forwarded");
status = Message.STATUS_RECIEVED; status = Message.STATUS_RECEIVED;
} else if (packet.hasChild("sent")) { } else if (packet.hasChild("sent")) {
forwarded = packet.findChild("sent").findChild("forwarded"); forwarded = packet.findChild("sent").findChild("forwarded");
status = Message.STATUS_SEND; status = Message.STATUS_SEND;
@ -198,12 +198,12 @@ public class MessageParser extends AbstractParser implements
} }
Element message = forwarded.findChild("message"); Element message = forwarded.findChild("message");
if ((message == null) || (!message.hasChild("body"))) { if ((message == null) || (!message.hasChild("body"))) {
if (status == Message.STATUS_RECIEVED && message.getAttribute("from")!=null) { if (status == Message.STATUS_RECEIVED && message.getAttribute("from")!=null) {
parseNormal(message, account); parseNormal(message, account);
} }
return null; return null;
} }
if (status == Message.STATUS_RECIEVED) { if (status == Message.STATUS_RECEIVED) {
fullJid = message.getAttribute("from"); fullJid = message.getAttribute("from");
if (fullJid == null) { if (fullJid == null) {
return null; return null;
@ -389,7 +389,7 @@ public class MessageParser extends AbstractParser implements
} else if (packet.getType() == MessagePacket.TYPE_GROUPCHAT) { } else if (packet.getType() == MessagePacket.TYPE_GROUPCHAT) {
message = this.parseGroupchat(packet, account); message = this.parseGroupchat(packet, account);
if (message != null) { if (message != null) {
if (message.getStatus() == Message.STATUS_RECIEVED) { if (message.getStatus() == Message.STATUS_RECEIVED) {
message.markUnread(); message.markUnread();
} else { } else {
message.getConversation().markRead(); message.getConversation().markRead();

View File

@ -406,7 +406,7 @@ public class ConversationFragment extends Fragment {
} }
for (Message message : this.conversation.getMessages()) { for (Message message : this.conversation.getMessages()) {
if ((message.getEncryption() == Message.ENCRYPTION_PGP) if ((message.getEncryption() == Message.ENCRYPTION_PGP)
&& ((message.getStatus() == Message.STATUS_RECIEVED) || (message && ((message.getStatus() == Message.STATUS_RECEIVED) || (message
.getStatus() == Message.STATUS_SEND))) { .getStatus() == Message.STATUS_SEND))) {
decryptMessage(message); decryptMessage(message);
break; break;
@ -472,7 +472,7 @@ public class ConversationFragment extends Fragment {
--i; --i;
} }
} else { } else {
if (this.messageList.get(i).getStatus() == Message.STATUS_RECIEVED) { if (this.messageList.get(i).getStatus() == Message.STATUS_RECEIVED) {
addedStatusMsg = true; addedStatusMsg = true;
} else { } else {
if (this.messageList.get(i).getStatus() == Message.STATUS_SEND_DISPLAYED) { if (this.messageList.get(i).getStatus() == Message.STATUS_SEND_DISPLAYED) {

View File

@ -67,7 +67,7 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> {
convLastMsg.setVisibility(View.VISIBLE); convLastMsg.setVisibility(View.VISIBLE);
imagePreview.setVisibility(View.GONE); imagePreview.setVisibility(View.GONE);
} else if (latestMessage.getType() == Message.TYPE_IMAGE) { } else if (latestMessage.getType() == Message.TYPE_IMAGE) {
if (latestMessage.getStatus() >= Message.STATUS_RECIEVED) { if (latestMessage.getStatus() >= Message.STATUS_RECEIVED) {
convLastMsg.setVisibility(View.GONE); convLastMsg.setVisibility(View.GONE);
imagePreview.setVisibility(View.VISIBLE); imagePreview.setVisibility(View.VISIBLE);
activity.loadBitmap(latestMessage, imagePreview); activity.loadBitmap(latestMessage, imagePreview);
@ -77,7 +77,7 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> {
if (latestMessage.getStatus() == Message.STATUS_RECEIVED_OFFER) { if (latestMessage.getStatus() == Message.STATUS_RECEIVED_OFFER) {
convLastMsg.setText(activity convLastMsg.setText(activity
.getText(R.string.image_offered_for_download)); .getText(R.string.image_offered_for_download));
} else if (latestMessage.getStatus() == Message.STATUS_RECIEVING) { } else if (latestMessage.getStatus() == Message.STATUS_RECEIVING) {
convLastMsg.setText(activity convLastMsg.setText(activity
.getText(R.string.receiving_image)); .getText(R.string.receiving_image));
} else { } else {

View File

@ -81,7 +81,7 @@ public class MessageAdapter extends ArrayAdapter<Message> {
public int getItemViewType(int position) { public int getItemViewType(int position) {
if (getItem(position).getType() == Message.TYPE_STATUS) { if (getItem(position).getType() == Message.TYPE_STATUS) {
return STATUS; return STATUS;
} else if (getItem(position).getStatus() <= Message.STATUS_RECIEVED) { } else if (getItem(position).getStatus() <= Message.STATUS_RECEIVED) {
return RECIEVED; return RECIEVED;
} else { } else {
return SENT; return SENT;
@ -93,7 +93,7 @@ public class MessageAdapter extends ArrayAdapter<Message> {
String info = null; String info = null;
boolean error = false; boolean error = false;
boolean multiReceived = message.getConversation().getMode() == Conversation.MODE_MULTI boolean multiReceived = message.getConversation().getMode() == Conversation.MODE_MULTI
&& message.getStatus() <= Message.STATUS_RECIEVED; && message.getStatus() <= Message.STATUS_RECEIVED;
if (message.getType() == Message.TYPE_IMAGE) { if (message.getType() == Message.TYPE_IMAGE) {
String[] fileParams = message.getBody().split(","); String[] fileParams = message.getBody().split(",");
try { try {
@ -152,7 +152,7 @@ public class MessageAdapter extends ArrayAdapter<Message> {
String formatedTime = UIHelper.readableTimeDifference(getContext(), String formatedTime = UIHelper.readableTimeDifference(getContext(),
message.getTimeSent()); message.getTimeSent());
if (message.getStatus() <= Message.STATUS_RECIEVED) { if (message.getStatus() <= Message.STATUS_RECEIVED) {
if ((filesize != null) && (info != null)) { if ((filesize != null) && (info != null)) {
viewHolder.time.setText(filesize + " \u00B7 " + info); viewHolder.time.setText(filesize + " \u00B7 " + info);
} else if ((filesize == null) && (info != null)) { } else if ((filesize == null) && (info != null)) {
@ -215,7 +215,7 @@ public class MessageAdapter extends ArrayAdapter<Message> {
viewHolder.messageBody.setText(message.getBody().trim()); viewHolder.messageBody.setText(message.getBody().trim());
} else { } else {
String privateMarker; String privateMarker;
if (message.getStatus() <= Message.STATUS_RECIEVED) { if (message.getStatus() <= Message.STATUS_RECEIVED) {
privateMarker = activity.getString(R.string.private_message); privateMarker = activity.getString(R.string.private_message);
} else { } else {
String to; String to;
@ -321,7 +321,7 @@ public class MessageAdapter extends ArrayAdapter<Message> {
break; break;
case RECIEVED: case RECIEVED:
view = (View) activity.getLayoutInflater().inflate( view = (View) activity.getLayoutInflater().inflate(
R.layout.message_recieved, parent, false); R.layout.message_received, parent, false);
viewHolder.message_box = (LinearLayout) view viewHolder.message_box = (LinearLayout) view
.findViewById(R.id.message_box); .findViewById(R.id.message_box);
viewHolder.contact_picture = (ImageView) view viewHolder.contact_picture = (ImageView) view
@ -428,7 +428,7 @@ public class MessageAdapter extends ArrayAdapter<Message> {
} }
if (item.getType() == Message.TYPE_IMAGE) { if (item.getType() == Message.TYPE_IMAGE) {
if (item.getStatus() == Message.STATUS_RECIEVING) { if (item.getStatus() == Message.STATUS_RECEIVING) {
displayInfoMessage(viewHolder, R.string.receiving_image); displayInfoMessage(viewHolder, R.string.receiving_image);
} else if (item.getStatus() == Message.STATUS_RECEIVED_OFFER) { } else if (item.getStatus() == Message.STATUS_RECEIVED_OFFER) {
viewHolder.image.setVisibility(View.GONE); viewHolder.image.setVisibility(View.GONE);

View File

@ -98,7 +98,7 @@ public class JingleConnection {
+ imageHeight); + imageHeight);
mXmppConnectionService.databaseBackend.createMessage(message); mXmppConnectionService.databaseBackend.createMessage(message);
mXmppConnectionService.markMessage(message, mXmppConnectionService.markMessage(message,
Message.STATUS_RECIEVED); Message.STATUS_RECEIVED);
} }
Log.d("xmppService", Log.d("xmppService",
"sucessfully transmitted file:" + file.getAbsolutePath()); "sucessfully transmitted file:" + file.getAbsolutePath());
@ -380,7 +380,7 @@ public class JingleConnection {
private void sendAccept() { private void sendAccept() {
status = STATUS_ACCEPTED; status = STATUS_ACCEPTED;
mXmppConnectionService.markMessage(message, Message.STATUS_RECIEVING); mXmppConnectionService.markMessage(message, Message.STATUS_RECEIVING);
this.mJingleConnectionManager.getPrimaryCandidate(this.account, this.mJingleConnectionManager.getPrimaryCandidate(this.account,
new OnPrimaryCandidateFound() { new OnPrimaryCandidateFound() {
@ -618,7 +618,7 @@ public class JingleConnection {
this.disconnect(); this.disconnect();
this.status = STATUS_FINISHED; this.status = STATUS_FINISHED;
this.mXmppConnectionService.markMessage(this.message, this.mXmppConnectionService.markMessage(this.message,
Message.STATUS_RECIEVED); Message.STATUS_RECEIVED);
this.mJingleConnectionManager.finishConnection(this); this.mJingleConnectionManager.finishConnection(this);
} }