package com.lucciola.haskellanywhereforandroid;

import android.app.Activity;

/**
 * Created by hiden on 2017/06/19.
 */

public class CommandAction extends UIAction {

    public CommandAction(String arg0, String arg1, Model arg2, Activity arg3) {
        super(arg0, arg1, arg2, arg3);
    }

    @Override
    protected void onPreExecute() {
        if (this.inputString.equals("clear")) {
            this.model.clearMonitor();
        } else {
            this.model.addMonitorText(this.inputString + this.documentString);
        }
    }

    @Override
    protected String doInBackground(Void... params) {
        return "";
    }

    @Override
    protected void onPostExecute(String arg0) {
    }
}

@@ -352,28 +352,31 @@
    if (this.
-inpu
+documen
 tString.equa
@@ -384,16 +384,18 @@
 s(%22clear
+%5Cn
 %22)) %7B%0A  

clear command